On 5 Feb 2021, at 7:47, Jacob Carlborg via TextMate wrote:

Something definitely happened. If you look at the load commands of the binary (LC_BUILD_VERSION), you’ll set that it says:
minos 10.15
sdk 11.1

Ah… I did not explicitly specify minimum OS version at link time, only at compile time. I have pushed a new build that should fix this.

Btw: What command/tool do you use to inspect this?

You can have multiple versions of Xcode installed side by side, if you still want to support older versions. But that would lead multiple binaries.

Yes, I have had to do that in the past, but when you use an old version of Xcode, you cannot use new features, for example, you need a fairly recent version to build for M1 macs.

Clang allows me to compile as far back as 10.4. Is there anything in the SDK that prevent you to target older versions?

Technically yes, you can build for 10.4. I have however run into some practical problems. Most recently TextMate would link against a (system) library that did not exist on older versions of macOS. I think it was a bug in the SDK. I also recently had a problem with the preferences window (and the cross-fade when switching between tabs), when building on 10.15 and running on 10.14, it would look broken, but building on 10.14 worked fine.

So some subtly changed AppKit behavior based on SDK version: In some cases this is expected, but generally behavior should remain the same on OS versions older than the SDK version, but it has not always been my experience.

IIRC, you’re using Ninja and not Xcode to build?

Correct, but I still call clang and friends via xcrun, so it produces the same build as Xcode would (given the same inputs and build options) and is also compatible with xcode-select.