-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler-rt: build builtins on darwin
The missing xcrun meant builtins were missing from darwin. This apparently wasn't an issue until now, but is in projects using `@available` checks. (The ARM64 hack was apparently the previous solution to fixing broken SDK detection.)
- Loading branch information
Showing
6 changed files
with
61 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CMake tries to read a list field from SDKSettings.plist, but the output of | ||
xcbuild PlistBuddy is incompatible with Apple's. (Plus we don't want it in our | ||
dependencies.) | ||
|
||
Simply assume ARM64 is supported by the SDK. We already limit the actual archs | ||
we build for by setting DARWIN_osx_BUILTIN_ARCHS explicitely. | ||
|
||
--- a/cmake/builtin-config-ix.cmake | ||
+++ b/cmake/builtin-config-ix.cmake | ||
@@ -97,14 +97,7 @@ if(APPLE) | ||
set(DARWIN_osx_BUILTIN_MIN_VER 10.5) | ||
set(DARWIN_osx_BUILTIN_MIN_VER_FLAG | ||
-mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER}) | ||
- set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64}) | ||
- # Add support for arm64 macOS if available in SDK. | ||
- foreach(arch ${ARM64}) | ||
- sdk_has_arch_support(${DARWIN_osx_SYSROOT} macosx ${arch} MACOS_ARM_SUPPORT) | ||
- if (MACOS_ARM_SUPPORT) | ||
- list(APPEND DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${arch}) | ||
- endif() | ||
- endforeach(arch) | ||
+ set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64} ${ARM64}) | ||
|
||
if(COMPILER_RT_ENABLE_IOS) | ||
list(APPEND DARWIN_EMBEDDED_PLATFORMS ios) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters