Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115396
D7740.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7740.diff
View Options
diff --git a/cmake/platforms/OSX.cmake b/cmake/platforms/OSX.cmake
--- a/cmake/platforms/OSX.cmake
+++ b/cmake/platforms/OSX.cmake
@@ -38,6 +38,8 @@
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+# When cross-compiling for Darwin using Clang, -mlinker-version must be passed
+# to ensure that modern linker features are enabled.
string(APPEND CMAKE_CXX_FLAGS_INIT " -stdlib=libc++ -mlinker-version=${LD64_VERSION}")
# Ensure we use an OSX specific version the binary manipulation tools.
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -5,6 +5,9 @@
LD64_VERSION=530
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
+
+# When cross-compiling for Darwin using Clang, -mlinker-version must be passed to
+# ensure that modern linker features are enabled.
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:02 (15 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187459
Default Alt Text
D7740.diff (1 KB)
Attached To
D7740: doc: explain why passing -mlinker-version is required
Event Timeline
Log In to Comment