-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the runfiles directory to the runtime library search paths
When executing a C++ binary through REv2 directly (e.g., directly as a genrule, not as a dependency of another script/executable), the input root will only contain a _solib_arch directory inside the executable's runfiles directory. This means that library lookups also need to consider rpath $ORIGIN/$executable.runfiles/$workspace/_solib_$arch/. Only looking at ../../../_solib_$arch/ is not sufficient. This issue isn't noticeable when doing local execution, for the reason that rtld/dyld will first do a realpath() on the executable, meaning the lookup of shared objects takes place outside of the sandbox, inside of bazel-out/ directly. This change extends LibrariesToLinkCollector to duplicate all runtime library search paths. One for bare execution, and one for execution inside a runfiles directory. Change-Id: I4256cb46fee737139aba6f1cfb0531aea5deb315
- Loading branch information
1 parent
6714c30
commit 1e781d0
Showing
3 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters