-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Patch rules_foreign_cc to not link bazel default libraries into GNUMake #37632
Conversation
Things that rules_foreign_cc is building, including its own tools, are not built by bazel directly, so don't inject libraries into them. The tooling that's actually building those tools knows what it is doing. This patch should be upstreamed. Signed-off-by: Alejandro R Sedeño <[email protected]>
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to |
Signed-off-by: Alejandro R. Sedeño <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @asedeno
Patch needs more work to scope it down. |
Signed-off-by: Alejandro R. Sedeño <[email protected]>
Head branch was pushed to by a user without write access
When upstream
rules_foreign_cc
builds its own GNUMake, it injects bazel's default libraries intoLDFLAGS
, which causes trouble on Darwin in newer versions of Bazel that added-lm
to the list of default libraries.As explained nicely in bazel-contrib/rules_foreign_cc#1227, Apple's libm re-exports a bunch of symbols and, due to linker argument order, clobbers some symbols from make itself. We don't need any of the default libraries in GNUMake, so disable the feature to link them.
Risk Level: low
Testing: CI