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

Bazel hardcodes passing -static-libgcc even if you don't use libgcc #6185

Closed
dapirian opened this issue Sep 19, 2018 · 1 comment
Closed
Assignees
Labels
team-Rules-CPP Issues for C++ rules

Comments

@dapirian
Copy link

ATTENTION! Please read and follow:

Description of the problem / feature request:

Bazel hardcodes passing -static-libgcc even if you compile with -rtlib=compiler-rt. This doesn't particularly hurt anything, but it causes warnings to be spammed:
clang: warning: argument unused during compilation: '-static-libgcc' [-Wunused-command-line-argument]

Looks like this happens here:

linkActionBuilder.addLinkopt("-static-libgcc");

This should be configurable somewhere toolchain/crosstool related.

Feature requests: what underlying problem are you trying to solve with this feature?

Trying to use compiler-rt with bazel

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

Build with clang and pass -rtlib=compiler-rt

What operating system are you running Bazel on?

Ubuntu 14.04

What's the output of bazel info release?

release 0.16.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

Not a public repo

Have you found anything relevant by searching the web?

No

Any other information, logs, or outputs that you want to share?

No

@benjaminp
Copy link
Collaborator

You can pass --experimental_dont_emit_static_libgcc to inhibit that.

@iirina iirina added team-Rules-CPP Issues for C++ rules untriaged labels Sep 25, 2018
@scentini scentini self-assigned this Oct 11, 2018
bazel-io pushed a commit that referenced this issue Feb 12, 2019
Closes #6825.
Closes #6185.

This is a rollforward of 5d77edf after Bazel with the flag was cut.

RELNOTES: Incompatible flag `--incompatible_dont_emit_static_libgcc` has been flipped (#6825)
PiperOrigin-RevId: 233589665
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

No branches or pull requests

4 participants