nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1--- a/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:13:55.000000000 +0100
2+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:19:37.000000000 +0100
3@@ -43,41 +43,6 @@
4 set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE)
5 endfunction()
6
7-function(find_darwin_sdk_version var sdk_name)
8- # We deliberately don't cache the result here because
9- # CMake's caching causes too many problems.
10- set(result_process 1)
11- if(NOT DARWIN_PREFER_PUBLIC_SDK)
12- # Let's first try the internal SDK, otherwise use the public SDK.
13- execute_process(
14- COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version
15- RESULT_VARIABLE result_process
16- OUTPUT_VARIABLE var_internal
17- OUTPUT_STRIP_TRAILING_WHITESPACE
18- ERROR_FILE /dev/null
19- )
20- endif()
21- if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}")
22- execute_process(
23- COMMAND xcrun --sdk ${sdk_name} --show-sdk-version
24- RESULT_VARIABLE result_process
25- OUTPUT_VARIABLE var_internal
26- OUTPUT_STRIP_TRAILING_WHITESPACE
27- ERROR_FILE /dev/null
28- )
29- endif()
30- if(NOT result_process EQUAL 0)
31- message(FATAL_ERROR
32- "Failed to determine SDK version for \"${sdk_name}\" SDK")
33- endif()
34- # Check reported version looks sane.
35- if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")
36- message(FATAL_ERROR
37- "Reported SDK version \"${var_internal}\" does not look like a version")
38- endif()
39- set(${var} ${var_internal} PARENT_SCOPE)
40-endfunction()
41-
42 # There isn't a clear mapping of what architectures are supported with a given
43 # target platform, but ld's version output does list the architectures it can
44 # link for.
45@@ -119,17 +84,6 @@
46 foreach(flag ${DARWIN_${os}_LINK_FLAGS})
47 set(os_linker_flags "${os_linker_flags} ${flag}")
48 endforeach()
49-
50- # Disable building for i386 for macOS SDK >= 10.15. The SDK doesn't support
51- # linking for i386 and the corresponding OS doesn't allow running macOS i386
52- # binaries.
53- if ("${os}" STREQUAL "osx")
54- find_darwin_sdk_version(macosx_sdk_version "macosx")
55- if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
56- message(STATUS "Disabling i386 slice for ${valid_archs}")
57- list(REMOVE_ITEM archs "i386")
58- endif()
59- endif()
60 endif()
61
62 # The simple program will build for x86_64h on the simulator because it is