-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bazel 0.22 contains further updates to the new C++ API: bazelbuild/bazel#4570 It seems these removed access to the unmangled library names for C library dependencies. On MacOS dynamic libraries contain the path to the unmangled library in their "library name", which means that targets linking against these dynamic libraries will reference the unmangled target. We need to patch them to instead refer to the mangled target relative to `@rpath`. As we no longer have access to the unmangled targets, we can no longer easily patch the targets. Furthermore, GHC generates intermediate dynamic libraries which will try to load the unmangled libraries. Without them available, we cannot make this step pass sucessfully. We work around this by copying and patching the link library dependencies to change their "library name" to the mangled name relative to `@rpath`. Then we no longer need to patch the targets depending on these libraries, as the linker will write the correct linking commands into them.
- Loading branch information
Showing
8 changed files
with
165 additions
and
136 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
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
Oops, something went wrong.