Add support for BAZEL_CONLYOPTS, BAZEL_CXXOPTS, BAZEL_LINKOPTS#416
Add support for BAZEL_CONLYOPTS, BAZEL_CXXOPTS, BAZEL_LINKOPTS#416keith merged 1 commit intobazelbuild:masterfrom
Conversation
|
can you rebase? i think the argument that the default toolchain does this is enough for us to do it here too, but what's the use case for this vs passing |
|
Happy to rebase. I started with I'm doing a multi-platform build. I'm both compiling for a mac (universal binary), and building for an embedded linux platform. I'm using transitions to generate a maven artifact with all the architectures and operating system binaries in it at. I will say, it took me longer than I would like to admit to discover that the toolchain in |
When doing multi-platform builds, using --cxxopt and friends ends up modifying the toolchain for both OSX, and any target. rules_cc provides environmental variables to modify the toolchain (which can be modified through --repo_env), which get around this issue. Add support here for them too. Signed-off-by: Austin Schuh <austin.linux@gmail.com>
495980e to
e4afe60
Compare
|
But if both tool chains read this doesn't that mean you get the same behavior as a global copt? |
|
Correct. In my case, I am providing a second toolchain which is configured differently. I have a working review I can share with this applied as a patch. I think the ideal solution would be to be able to configure the toolchain from the workspace/module.bazel file. I think that is a larger change though, and more work to coordinate the API to match across all the platforms. |
|
i think this is fine, likely the real change will be once we can use rules based toolchains here we'll expect users to add features manually for this kinda thing instead |
|
Oh, 100%, rule based toolchains would be a lot better here. One day... |
When doing multi-platform builds, using --cxxopt and friends ends up modifying the toolchain for both OSX, and any target. rules_cc provides environmental variables to modify the toolchain (which can be modified through --repo_env), which get around this issue. Add support here for them too.