Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify a build target as both host and target? #12570

Open
apache-hb opened this issue Nov 29, 2023 · 4 comments
Open

Ability to specify a build target as both host and target? #12570

apache-hb opened this issue Nov 29, 2023 · 4 comments

Comments

@apache-hb
Copy link
Contributor

Theres currently no way to specify a language/library/executable to be added/built for both native and target machines at the same time. This is causing me a lot of duplicate build declarations when wanting to do something such as running unit tests on the host machine then link the final executable for the target machine. Is there a common pattern to avoid this duplication?

@apache-hb apache-hb changed the title Ability to specify a dependency as both host and target? Ability to specify a build target as both host and target? Nov 29, 2023
@dcbaker
Copy link
Member

dcbaker commented Nov 30, 2023

Edit: Oh, you mean being able to do something like executable('blah', native : 'both')>

Could I interest you in: #12258?

Needs a rebase for 1.3 still

@apache-hb
Copy link
Contributor Author

Edit: Oh, you mean being able to do something like executable('blah', native : 'both')>

something precisely like that, perhaps also for add_languages as right now not specifying native is a warning

@xclaesse
Copy link
Member

@apache-hb currently that requires setupping 2 separate build directories. Allowing building for both platforms at the same time is something we want but is not easy to implement, @dcbaker has been working on that, at least for subprojects.

@dcbaker
Copy link
Member

dcbaker commented Nov 30, 2023

something precisely like that, perhaps also for add_languages as right now not specifying native is a warning

That I can help with: #12022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants