Skip to content

Commit 423949a

Browse files
committed
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. ```
1 parent 1c8893b commit 423949a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

depends/hosts/darwin.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(
7171
#
7272
# Adds the desired paths from the SDK
7373
#
74+
# -platform_version
75+
#
76+
# Indicate to the linker the platform, the oldest supported version,
77+
# and the SDK used.
7478

7579
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
7680
-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 \
9195

9296
darwin_CFLAGS=-pipe -std=$(C_STANDARD)
9397
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
98+
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
9499

95100
ifneq ($(LTO),)
96101
darwin_CFLAGS += -flto

0 commit comments

Comments
 (0)