-
Notifications
You must be signed in to change notification settings - Fork 681
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
Disable RPath usage on macOS #7076
Conversation
This interferes with dead_strip_dylib, and pollutes the load commands, which have a size limit in recent macOS versions. We now rely on GHC to construct the correct -rpath entries *after* the linking phase by inspecting the produced dynamic product and adding -rpaths for all non-dead-stripped referenced libraries. See https://gitlab.haskell.org/ghc/ghc/-/commit/4ff93292243888545da452ea4d4c1987f2343591 or ghc/ghc@4ff9329 Commissioned-by: Mercury Technologies, Inc. (mercury.com)
5ae413d
to
c250d38
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.
I see no tests.
What happens with GHC-8.6 and older?
-- well as being part of GHC 9.2 onwards. | ||
-- | ||
-- We know the GHC in question supports this if it knows about | ||
-- `install_name_tool` or `otool`. |
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.
This suggests that there should some check of install_name_tool
?
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.
Yes. Need to figure out how.
Do you have suggestions how to test this properly? Effectively we strip cabal from passing
Won't get this feature. Hence cabal should pass |
This interferes with dead_strip_dylib, and pollutes the load commands,
which have a size limit in recent macOS versions. We now rely on GHC
to construct the correct -rpath entries after the linking phase by
inspecting the produced dynamic product and adding -rpaths for all
non-dead-stripped referenced libraries.
See https://gitlab.haskell.org/ghc/ghc/-/commit/4ff93292243888545da452ea4d4c1987f2343591
or ghc/ghc@4ff9329
Please include the following checklist in your PR:
changelog.d
directory).Please also shortly describe how you tested your change. Bonus points for added tests!