Make sanitizer builds respect -c for -g*#614
Conversation
Previously for `--features=asan` you got `-gline-tables-only`. This isn't ideal if you actually want to debug the sanitized code. Now it respects `--compilation_mode` so with `-c dbg` you get `-g` and with `-c fastbuild` you get `-gline-tables-only`. This is a tiny bit weird because we don't pass any `-g` for `fastbuild` normally. Fixes #613
|
A matter of fact was that today I actually wanted to debug |
|
i think at some point there are too many combos and you'll have to do |
That won't work and was the reason I raised the issue in the first place. I have As described by Gemini, the problem is that Bazel always puts flags that come from features last, thus overriding both which then overrides the former |
|
ah i don't think the not being able to override the order was explicit in the original report. i think we should probably fix that separately from this: #615 |
Heh 😅 , I linked the transcript of my chat with Gemini, who convinced me that flag order is a Bazel thing, not a toolchain thing. I'm glad it's possible to allow user flags to override toolchain feature flags directly from the toolchain config. |
|
other PR needs to be merged too, but i think with these combined we should be good |
Previously for
--features=asanyou got-gline-tables-only. Thisisn't ideal if you actually want to debug the sanitized code. Now it
respects
--compilation_modeso with-c dbgyou get-gand with-c fastbuildyou get-gline-tables-only.This is a tiny bit weird because we don't pass any
-gforfastbuildnormally.
Fixes #613