-
Notifications
You must be signed in to change notification settings - Fork 219
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
Multiple build configurations? #142
Comments
There is a single toolchain |
We have an example where we create a toolchain alias with select that might be of interest to you. |
Thanks, this looks very helpful. |
Summary: Pull Request resolved: facebookincubator/fizz#142 Reviewed By: namanahuja Differential Revision: D59832580 Pulled By: ahornby fbshipit-source-id: 1b936a007e5d08f7bc959d5775bce36b107f4bb3
I want to try
buck2
in a C++ project, and I want to be able to:What's the suggested way to implement this? Multiple toolchains? How does
cxx_library
orcxx_binary
know what toolchain to use?How would command line look like? Is something like
buck2 test //... --debug --asan
andbuck2 run //:main --release --gcc
possible?I found this page about configurations, and it seems like one should be able to
select()
things based on config values. Do I write a single toolchain that is parameterized by config values instead?buck2 build -c cpp.compiler=gcc -c cpp.debug=true //...
?I also found this RFC: https://buck2.build/docs/rfcs/drafts/configuration-at-syntax/, but it doesn't specify how to structure the project in order to make
buck2 build //foo:bar@release+gcc
possible.The text was updated successfully, but these errors were encountered: