depends: add -platform_version to macOS build flags

```bash
-platform_version platform min_version sdk_version
    This is set to indicate the platform, oldest supported version
    of that platform that output is to be used on, and the SDK that
    the output was built against.
```
This commit is contained in:
fanquake 2023-11-15 11:22:20 +00:00
parent 1c8893bd1c
commit 423949a13b
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -71,6 +71,10 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(
#
# Adds the desired paths from the SDK
#
# -platform_version
#
# Indicate to the linker the platform, the oldest supported version,
# and the SDK used.
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
@ -91,6 +95,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
darwin_CFLAGS=-pipe -std=$(C_STANDARD)
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
ifneq ($(LTO),)
darwin_CFLAGS += -flto