Fix macOS test modules to link against the selected SDK

This commit is contained in:
Tom Gabsow committed 2026-10-15 17:12:26 +03:00
1 parent f6fd2877a9
commit ce9333df56
1 file changed
+3 -1
+3 -1
View File
@@ -37,7 +37,9 @@ endif
# OS X 11.x doesn't have /usr/lib/libSystem.dylib and needs an explicit setting.
ifeq ($(uname_S),Darwin)
ifeq ("$(wildcard /usr/lib/libSystem.dylib)","")
LIBS = -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lsystem
# Use the selected SDK; the CLT SDK may require a newer linker than Xcode.
MACOS_SDK := $(or $(SDKROOT),$(shell xcrun --sdk macosx --show-sdk-path))
LIBS = -L "$(MACOS_SDK)/usr/lib" -lsystem
endif
endif