-
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
incompatible_linkopts_to_linklibs: Move C++ toolchain's default LINKOPTS to LINKLIBS #10905
Labels
incompatible-change
Incompatible/breaking change
P2
We'll consider working on this in future. (Assignee optional)
team-Rules-CPP
Issues for C++ rules
Comments
oquenchil
added
incompatible-change
Incompatible/breaking change
P2
We'll consider working on this in future. (Assignee optional)
team-Rules-CPP
Issues for C++ rules
labels
Mar 5, 2020
bazel-io
pushed a commit
to bazelbuild/rules_cc
that referenced
this issue
Mar 6, 2020
Default linker flags contains flags like -lstdc++ which should come after the user libraries. The library flags are removed from default linker flags and added to link_libs instead which comes after user libraries. See #9254 Incompatible flag bug: bazelbuild/bazel#10905 I introduce a new method to repositories ctx that allows checking the value of a Starlark semantic option from a repository rule. RELNOTES:none PiperOrigin-RevId: 299336105 Change-Id: I81b9ee0c72e2a2252b406f1c584997389a530e40
bazel-io
pushed a commit
that referenced
this issue
Mar 6, 2020
Default linker flags contains flags like -lstdc++ which should come after the user libraries. The library flags are removed from default linker flags and added to link_libs instead which comes after user libraries. See #9254 Incompatible flag bug: #10905 I introduce a new method to repositories ctx that allows checking the value of a Starlark semantic option from a repository rule. RELNOTES:none PiperOrigin-RevId: 299336105
This was referenced Mar 9, 2020
benjaminp
added a commit
to benjaminp/bazel
that referenced
this issue
Oct 22, 2020
benjaminp
added a commit
to benjaminp/bazel
that referenced
this issue
Oct 22, 2020
benjaminp
added a commit
to benjaminp/bazel
that referenced
this issue
Oct 22, 2020
Closing, because this flag has been flipped. |
stolyaroleh
added a commit
to stolyaroleh/pesto
that referenced
this issue
Feb 26, 2021
..instead of BAZEL_LINKOPTS. See bazelbuild/bazel#10905.
1 task
copybara-service bot
pushed a commit
that referenced
this issue
Aug 24, 2022
…klibs The incompatible flag was flipped in 2020 (#10905) and is the only flag for which repository_ctx.flag_enabled is used. This CL removes the flag, the Starlark code that checks the flag, and the flag_enabled method itself. PiperOrigin-RevId: 469715344 Change-Id: I0e7198c6d5a99b1bd947c8fda830a2c394eb38b1
aiuto
pushed a commit
to aiuto/bazel
that referenced
this issue
Oct 12, 2022
…klibs The incompatible flag was flipped in 2020 (bazelbuild#10905) and is the only flag for which repository_ctx.flag_enabled is used. This CL removes the flag, the Starlark code that checks the flag, and the flag_enabled method itself. PiperOrigin-RevId: 469715344 Change-Id: I0e7198c6d5a99b1bd947c8fda830a2c394eb38b1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
incompatible-change
Incompatible/breaking change
P2
We'll consider working on this in future. (Assignee optional)
team-Rules-CPP
Issues for C++ rules
unix_cc_configure used to have the default BAZEL_LINKOPTS [-lstdc++:-lm] and no default BAZEL_LINKLIBS which should have been the other way around. Flags in the former appear first in the command line before user linked libraries and the latter appears last. Because of this, the incompatible change #7687 started causing issues for many people (#9254)
Flag: --incompatible_linkopts_to_linklibs
This is an incompatible change because many people override the default BAZEL_LINKOPTS and the default BAZEL_LINKLIBS. For example, they may have BAZEL_LINKOPTS="-lc++:-lm", so with this change they would have both -lc++ and -lstdc++ in the command line.
Migration
If you were using BAZEL_LINKOPTS to add libraries, make sure you use BAZEL_LINKLIBS now.
Workaround till flag is flipped
Set the
BAZEL_LINKOPTS
andBAZEL_LINKLIBS
variables yourself. You can do that in the bazelrc file with--repo_env
The text was updated successfully, but these errors were encountered: