debug / release build not as expected

1,330 views
Skip to first unread message

stra...@google.com

unread,
Apr 3, 2015, 9:25:30 PM4/3/15
to bazel-...@googlegroups.com
Specifying debug/release builds does not to work the way as would I expect it to.

When running "bazel build -c dbg --subcommands //...", I'd expect to see "-g" in the output, though there is no "-g" in the output and hence no debug symbols in the c++ binary.

(My current workaround is "bazel build --copt -g --strip=never //...".)

Similarly, I would expect "-c opt" to define "-DNDEBUG" and "-O3", but it does not.

Any hints would be highly appreciated.

Ulf Adams

unread,
Apr 7, 2015, 8:00:45 AM4/7/15
to stra...@google.com, bazel-...@googlegroups.com
We're actually trying to remove the dbg mode within Google and instead put (some) debug information into every binary by default, such as -gmlt (https://gcc.gnu.org/ml/gcc-patches/2011-04/msg02075.html).

That said, if you want to change what flags the different modes set, you can do that in the CROSSTOOL file, which should be in tools/cpp (and we probably want to update the CROSSTOOL file we ship in Bazel).

Filed https://github.com/google/bazel/issues/99 for the opt mode flags.


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/df72971c-db75-4e05-97d6-0b98ca054e5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages