-
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't include non-executable go_binary in dependent's runfiles (#3151)
* Remove unnecessary rpath special handling on macOS Based on bazelbuild/bazel#10254 (comment) and bazelbuild/bazel#12304 being fixed, this special handling of rpaths on macOS appears to be unnecessary. This cleanup ensures that Bazel sets the correct metadata for the exec location of Go libraries linked in c-shared mode, which in turn allows to not include them in the runfiles of all dependents - cc_* targets depending on them will now generate the correct rpath entries to find the libraries at runtime at the usual position. * Don't include non-executable go_binary in dependent's runfiles If a go_binary is built with a non-executable link mode such as `c-archive`, its dependents currently pick up a runfile dependency on it since its DefaultInfo specifies the resulting archive as an executable. This is unnecessary as the dependent should be able to decide whether to include the file (e.g. dynamic linking) or not (e.g. static linking). With this commit, the executable field of the DefaultInfo is only populated if the go_binary is built with an executable link mode. Follow-up to #3143
- Loading branch information
Showing
3 changed files
with
59 additions
and
20 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