Pick up SDKROOT as the sysroot fallback.
Ken Cunningham
ken.cunningham.webuse at gmail.com
Sun Oct 13 20:53:37 UTC 2019
>
> Also, note that if you execute the buried clang compilers in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin or /Library/Developer/CommandLineTools/usr/bin that they can't find the SDK.
> Jack
>
The logic to add SDKROOT to the environment comes via xrun calling the tool.
xcrun sets up the environment, and then passes off to the chosen tool in the selected tool sdk once the environment variable is set.
clang (all versions back to ?, Apple and llvm) will respect the SDKROOT if they see it, and if they are not steered wrong by an errant -isysroot on the command line.
The big advantage to all this for us is that using the env vars, and bypassing 20 sometimes arcane build systems, we can get the SDK (any SDK) we want.
But it needs to be tested to see just how it will all function, in the MacPorts milieu, and we are on like step 2 of 47. If we push too fast, we’ll just break everything, and spook everyone off before we even get a chance to get started.
And — get ready — it might not work out, in the end, to do it this way, as Josh has said.
K
More information about the macports-dev
mailing list