1
1
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
2
- index 8046ea79966..4c2c040a573 100644
2
+ index 8046ea79966..cd4fa6e673b 100644
3
3
--- a/cmake/modules/CMakeLists.txt
4
4
+++ b/cmake/modules/CMakeLists.txt
5
- @@ -17,3 +17,55 @@ configure_file(
5
+ @@ -17,3 +17,54 @@ configure_file(
6
6
SwiftConfig.cmake.in
7
7
${swift_cmake_builddir}/SwiftConfig.cmake
8
8
@ONLY)
9
9
+
10
- +
11
10
+ # Generate install-tree CMake files
12
11
+ set(SWIFT_CONFIG_CODE "
13
- + # Compute the installation prefix from this LLVMConfig .cmake file location.
12
+ + # Compute the installation prefix from this SwiftConfig .cmake file location.
14
13
+ get_filename_component(SWIFT_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
15
14
+ # Construct the proper number of get_filename_component(... PATH)
16
15
+ # calls to compute the installation prefix.
@@ -59,10 +58,10 @@ index 8046ea79966..4c2c040a573 100644
59
58
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/stdlib/public/SwiftShims DESTINATION stdlib/public)
60
59
+
61
60
diff --git a/cmake/modules/SwiftComponents.cmake b/cmake/modules/SwiftComponents.cmake
62
- index d7a03ae74ed..5506512d77f 100644
61
+ index 4d77e374deb..88b6645a811 100644
63
62
--- a/cmake/modules/SwiftComponents.cmake
64
63
+++ b/cmake/modules/SwiftComponents.cmake
65
- @@ -74 ,7 +74 ,7 @@ set(_SWIFT_DEFINED_COMPONENTS
64
+ @@ -76 ,7 +76 ,7 @@ set(_SWIFT_DEFINED_COMPONENTS
66
65
# for the following exceptions.
67
66
set(_SWIFT_DEFAULT_COMPONENTS "${_SWIFT_DEFINED_COMPONENTS}")
68
67
# 'dev' takes up a lot of disk space and isn't part of a normal toolchain.
@@ -71,28 +70,3 @@ index d7a03ae74ed..5506512d77f 100644
71
70
# These clang header options conflict with 'clang-builtin-headers'.
72
71
list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "clang-resource-dir-symlink")
73
72
list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "clang-builtin-headers-in-clang-resource-dir")
74
- diff --git a/cmake/modules/SwiftSharedCMakeConfig.cmake b/cmake/modules/SwiftSharedCMakeConfig.cmake
75
- index 26ada5dc9ac..f5e98328616 100644
76
- --- a/cmake/modules/SwiftSharedCMakeConfig.cmake
77
- +++ b/cmake/modules/SwiftSharedCMakeConfig.cmake
78
- @@ -14,6 +14,20 @@ macro(swift_common_standalone_build_config_llvm product)
79
- # Then we import LLVMConfig. This is going to override whatever cached value
80
- # we have for LLVM_ENABLE_ASSERTIONS.
81
- find_package(LLVM CONFIG REQUIRED NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
82
- + if (APPLE)
83
- + if (LLVM_VERSION_MAJOR GREATER_EQUAL 12)
84
- + # Precompiled LLVM 12+ on macOS contains a hardcoded dependency on a very
85
- + # specific version of libcurses:
86
- + #
87
- + # set_target_properties(LLVMSupport PROPERTIES
88
- + # INTERFACE_LINK_LIBRARIES "m;ZLIB::ZLIB;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/lib/libcurses.tbd;LLVMDemangle"
89
- + # )
90
- + #
91
- + # So we are monkey-patching it here
92
- + set_target_properties(LLVMSupport PROPERTIES
93
- + INTERFACE_LINK_LIBRARIES "z;curses;m;LLVMDemangle")
94
- + endif()
95
- + endif()
96
- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
97
-
98
- set(LLVM_MAIN_SRC_DIR "${LLVM_BUILD_MAIN_SRC_DIR}"
0 commit comments