[MacPorts] #57612: clang does not respect -syslibroot when linking
MacPorts
noreply at macports.org
Mon Dec 17 01:51:36 UTC 2018
#57612: clang does not respect -syslibroot when linking
---------------------+--------------------
Reporter: kencu | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by jeremyhu):
`-Wl,-syslibroot` continues to do what it always has. The issue is that
passing it to xcrun does not stop xcrun from setting SDKROOT in the case
where you are using an SDK to build. The best way to do that is to use
-isysroot.
This behavior is really only relevant with Mojave because prior to Mojave,
MacPorts users would install the DevSDK (headers at /). With Mojave +, we
use the SDK directly. If an SDKROOT is not set (and not passed via
canonical command line arguments), xcrun implicitly sets SDKROOT. If you
intend to set the SDKROOT when invoking clang, you should do that with
`-isysroot` instead of `-Wl,-syslibroot. The latter only passes that
information to the linker whereas the former informs all stages of the
build pipeline.
--
Ticket URL: <https://trac.macports.org/ticket/57612#comment:26>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list