[TxMt] Re: Building with a different SDK

Ryan Schmidt textmate at ryandesign.com
Mon Feb 5 00:41:55 UTC 2018


On Feb 3, 2018, at 08:58, Ronald Wampler wrote:

> On Fri, Feb 2, 2018 at 10:03 PM, Ryan Schmidt wrote:
> 
>> On Feb 2, 2018, at 08:17, Ronald Wampler wrote:
>> 
>>> You can try passing -isysroot via CC and CXX.
>>> 
>>> CC='xcrun clang -isysroot/path/to/sdk' CXX='xcrun clang++
>>> -isysroot/path/to/sdk' ./configure
>> 
>> I could try that. I thought it was required to use -isysroot at compile time and -Wl,-syslibroot, at link time, hence the need to specify *C*FLAGS and LDFLAGS separately.
>> 
>> https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/20002000-1114311
> 
> I think the documentation is out of date wrt to clang. On Apple platforms,
> clang will set -syslibroot to -isysroot and will pass that to the linker. I
> am not sure when this was supported but you can verify it by running
> `clang -isysroot /path/to/sdk -### a.o` and check if -syslibroot is set to
> '/path/to/sdk' and passed to the linker.

Thanks, just using -isysroot works.

If you're not sure whether the LDFLAGS will be passed to the compiler or to the linker, then you have to use -Wl,-syslibroot,. But since for textmate we're sure that we're passing the flag to the compiler, using -isysroot works fine.

There is a build failure when using the Xcode 7.2.1 or earlier version of the OS X 10.11 SDK; here's the fix:

https://github.com/textmate/textmate/pull/1402



More information about the textmate mailing list