Skip to content

Commit 2b43611

Browse files
committed
---
yaml --- r: 347046 b: refs/heads/master c: 3b53f55 h: refs/heads/master
1 parent 2a4b4b3 commit 2b43611

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 10bcdb27a4f7e0b5723f98a8d7aa4043b023aec3
2+
refs/heads/master: 3b53f55e7c54d1e56f507a9eae2913c24c9c72f3
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/stdlib/public/SwiftShims/CMakeLists.txt

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -84,35 +84,7 @@ endif()
8484
# First extract the "version" used for Clang's resource directory.
8585
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
8686
"${LLVM_PACKAGE_VERSION}")
87-
88-
# Function to find LLVM or Clang headers
89-
function(find_llvm_clang_headers suffix description out_var)
90-
file(TO_CMAKE_PATH "${SWIFT_PATH_TO_CLANG_BUILD}" PATH_TO_CLANG_BUILD)
91-
92-
set(headers_locations
93-
"${LLVM_LIBRARY_DIR}${suffix}"
94-
"${PATH_TO_CLANG_BUILD}/${CMAKE_CFG_INTDIR}/lib${suffix}"
95-
"${PATH_TO_CLANG_BUILD}/${LLVM_BUILD_TYPE}/lib${suffix}")
96-
97-
set(headers_location)
98-
foreach(loc ${headers_locations})
99-
if(EXISTS "${loc}")
100-
set(headers_location "${loc}")
101-
set(${out_var} "${loc}" PARENT_SCOPE)
102-
break()
103-
endif()
104-
endforeach()
105-
if("${headers_location}" STREQUAL "")
106-
message(FATAL_ERROR "${description} headers were not found in any of the following locations: ${headers_locations}")
107-
endif()
108-
endfunction()
109-
110-
if(SWIFT_BUILT_STANDALONE)
111-
find_llvm_clang_headers("/clang/${CLANG_VERSION}" "Clang"
112-
clang_headers_location)
113-
else() # NOT SWIFT_BUILT_STANDALONE
114-
set(clang_headers_location "${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}")
115-
endif()
87+
set(clang_headers_location "${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}")
11688

11789
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
11890
set(cmake_symlink_option "copy_directory")
@@ -152,7 +124,7 @@ swift_install_symlink_component(clang-resource-dir-symlink
152124
# Possibly install Clang headers under Clang's resource directory in case we
153125
# need to use a different version of the headers than the installed Clang. This
154126
# should be used in conjunction with clang-resource-dir-symlink.
155-
file(TO_CMAKE_PATH "${SWIFT_PATH_TO_CLANG_BUILD}"
127+
file(TO_CMAKE_PATH "${LLVM_LIBRARY_OUTPUT_INTDIR}"
156128
_SWIFT_SHIMS_PATH_TO_CLANG_BUILD)
157129
swift_install_in_component(clang-builtin-headers-in-clang-resource-dir
158130
DIRECTORY "${_SWIFT_SHIMS_PATH_TO_CLANG_BUILD}/lib/clang"

0 commit comments

Comments
 (0)