-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Replace hard-coded -g0
flags with a feature that can be used in the toolchain configuration.
#13308
Comments
AFAIK if there is a feature named |
Yup it seems we use |
So I think @chandlerc can implement what they need. It would still be great if Bazel didn't add |
I have custom rules that use the attribute parameter cfg="host" documented here: https://docs.bazel.build/versions/master/skylark/rules.html#configurations and these unexpected added -g0 flags is also present when I try to use the --host_compilation_mode=dbg. I was expecting to get debug information in my host build but was not. |
Oh I was very wrong! It turns out @katre is there a way to detect if we are in the host/exec configuration in Starlark? Right now it seems the only way is to check If not, can we at least unflip CC @oquenchil |
#13315 is in spirit a duplicate of this issue. |
We are (slowly) working to enable platforms and toolchains for C++ inside google and for Bazel users. Most of the difficulty comes from the interactions of the CC toolchain with Android and Apple code, and we're actively working to resolve that. You're going to need @oquenchil to figure out whether or not |
@katre what about a language independent way of querying if the current configuration is target or exec from Starlark? Is there a better way than inspecting the |
We don't currently have a way to do that. I think there's an open feature request but I don't think we've figured out the right way to expose that. |
I see, thank you! |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
How is one supposed to reach out to the triage team? Nothing I type into GitHub seems to do the trick. But this issue is still real, and still needs to be addressed. I don't understand how it is reasonable to just close it. |
@bazelbuild/triage Not stale |
Just stumbled across some lingering hard-coded compiler flags:
bazel/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
Lines 1093 to 1094 in 76a8498
Could these be removed?
Specifically, it'd be nice to have a feature similar to
opt
andfastbuild
that can be used as a condition to enable flags specifically in the host build. Ideally, I would suggesthost
. This would cause the host build to enable bothopt
andhost
features. And in turn, the crosstool configuration could disable debug info in the host build even if it would be enabled as part of theopt
build for the target.I noticed this because as implemented, the code actually adds
-g0
twice.The text was updated successfully, but these errors were encountered: