Skip to content
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

per_object_debug_info does not work with Clang 12 #14038

Closed
lizan opened this issue Sep 24, 2021 · 1 comment
Closed

per_object_debug_info does not work with Clang 12 #14038

lizan opened this issue Sep 24, 2021 · 1 comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug

Comments

@lizan
Copy link

lizan commented Sep 24, 2021

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Install clang 12 and set CC=clang CXX=clang++
In https://github.com/bazelbuild/examples/tree/main/cpp-tutorial/stage3 run:
bazel build --fission=yes --features=per_object_debug_info //main:hello-world.dwp

Then the output is:

INFO: Analyzed target //main:hello-world.dwp (16 packages loaded, 65 targets configured).
INFO: Found 1 target...
ERROR: /build/examples/cpp-tutorial/stage3/main/BUILD:3:11: output 'main/_objs/hello-greet/hello-greet.pic.dwo' was not created
ERROR: /build/examples/cpp-tutorial/stage3/main/BUILD:3:11: Compiling main/hello-greet.cc failed: not all outputs were created or valid
Target //main:hello-world.dwp failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.238s, Critical Path: 0.09s
INFO: 4 processes: 3 internal, 1 linux-sandbox.
FAILED: Build did NOT complete successfully

What operating system are you running Bazel on?

Ubuntu 18.04

What's the output of bazel info release?

release 4.2.1

Have you found anything relevant by searching the web?

Clang 12 release notes says:

  • -gsplit-dwarf no longer implies -g2.

Adding --copt=-g2 can make it work, but bazel should add it with toolchain detection. And it increases binary size when fission is not used.

@keith
Copy link
Member

keith commented Oct 5, 2021

I submitted #14084 for the default crosstools

keith added a commit to keith/bazel that referenced this issue Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants