-
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
Fix local execution of external dynamically linked cc_* targets #16214
Conversation
ebe1081
to
952c901
Compare
Just checking, so this doesn't need #14600 ? |
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.
In principle, I like this change, even though it results in somewhat unwieldy rpaths. Let's make sure, though, that it works with --experimental_sibling_repository_layout
. It looks like it does because that flag does not change the layout of the runfiles tree, but better be safe than sorry.
I'm also not very convinced that we need to worry about quoting commas in -Wl
.
@oquenchil , WDYT?
src/main/java/com/google/devtools/build/lib/rules/cpp/LibrariesToLinkCollector.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/rules/cpp/LibrariesToLinkCollector.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/rules/cpp/LibrariesToLinkCollector.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/rules/cpp/LibrariesToLinkCollector.java
Outdated
Show resolved
Hide resolved
952c901
to
55b1f58
Compare
That's right, mostly because it steals large parts from it :-) |
Turned out to be a flake. |
6cf13fa
to
5b792fe
Compare
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target.
5b792fe
to
7a750cc
Compare
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
@bazel-io flag |
The issue fixed by this PR is tracked for 5.3.1 at #16153 |
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes bazelbuild#16008 (comment) Closes bazelbuild#16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes bazelbuild#16008 (comment) Closes bazelbuild#16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes bazelbuild#16008 (comment) Closes bazelbuild#16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes bazelbuild#16008 (comment) Closes bazelbuild#16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes #16008 (comment) Closes #16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3 Co-authored-by: kshyanashree <[email protected]>
When a cc_binary tool is executed directly (e.g. in a genrule) with remote execution, its dynamic dependencies are only available from the solib directory in the runfiles directory. This commit adds an additional rpath entry for this directory. Since target names may contain commas and the newly added rpaths contain target names, the `-Xlinker` compiler is now used everywhere instead of the `-Wl` flag, which doesn't support commas in linker arguments. Stacked on #16214 Closes #16215. PiperOrigin-RevId: 474792702 Change-Id: I2bfa1fd77be83d7bfe54ba591af5cb0ad0e630fc
The fix for remote execution of external dynamically linked cc_* targets in 95a5bfd regressed local execution of such targets. This is fixed by emitting two rpaths in the case of an external target. Fixes bazelbuild#16008 (comment) Closes bazelbuild#16214. PiperOrigin-RevId: 473706330 Change-Id: I500f8b1f79e4d994323651fbb5964a730f1136e3
When a cc_binary tool is executed directly (e.g. in a genrule) with remote execution, its dynamic dependencies are only available from the solib directory in the runfiles directory. This commit adds an additional rpath entry for this directory. Since target names may contain commas and the newly added rpaths contain target names, the `-Xlinker` compiler is now used everywhere instead of the `-Wl` flag, which doesn't support commas in linker arguments. Stacked on bazelbuild#16214 Closes bazelbuild#16215. PiperOrigin-RevId: 474792702 Change-Id: I2bfa1fd77be83d7bfe54ba591af5cb0ad0e630fc
Fix dynamic library lookup with remotely executed tools When a cc_binary tool is executed directly (e.g. in a genrule) with remote execution, its dynamic dependencies are only available from the solib directory in the runfiles directory. This commit adds an additional rpath entry for this directory. Since target names may contain commas and the newly added rpaths contain target names, the `-Xlinker` compiler is now used everywhere instead of the `-Wl` flag, which doesn't support commas in linker arguments. Stacked on #16214 Closes #16215. PiperOrigin-RevId: 481621970 Change-Id: I5969a15ef0c828477f893216b6b702a3bad6b6fa
The fix for remote execution of external dynamically linked cc_* targets
in 95a5bfd regressed local execution of such targets. This is fixed
by emitting two rpaths in the case of an external target.
Fixes #16008 (comment)