-
Good Day, I was looking at the Bazel doc trying to find whether Bazel propagates Basically the setup we have is a large mostly C++ project with a lot of external dependencies. We have a pretty extensive I recently noticed that compiler flags defined in
However, during build some of the files don't have that compiler option, for example, this is one such example I got with
As you can see it's not that
What I'd like to understand, is Bazel expected to propagate compiler options that it got from command line or from one of the rc files, is it expected that Bazel will apply those to the external dependendencies? My expectation is that it should propagate flags, but I could not find any confirmation of that in the Bazel docs.
Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
In your example compile command that compilation is actually being done for the You can read more about the exec configuration here https://www.reddit.com/r/bazel/comments/18hg596/whats_the_meaning_of_exec_configuration/ / https://bazel.build/extending/rules#configurations It's likely that for the exec configuration you don't want sanitizers to apply, but if you do you can pass |
Beta Was this translation helpful? Give feedback.
In your example compile command that compilation is actually being done for the
exec
configuration, you can tell this from thebazel-out/k8-opt-exec-ST
in the output file path.You can read more about the exec configuration here https://www.reddit.com/r/bazel/comments/18hg596/whats_the_meaning_of_exec_configuration/ / https://bazel.build/extending/rules#configurations
It's likely that for the exec configuration you don't want sanitizers to apply, but if you do you can pass
--host_copt=-fsanitize=whatever
.