Skip to content

Commit e80bb67

Browse files
committed
build: remove a hack for clang dependencies
This was introduced in 2014. This should not be needed any longer, especially with the use of the clang dependencies being satisfied by export targets through `Clang_DIR`.
1 parent 66c9da0 commit e80bb67

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,23 +1274,6 @@ function(_add_swift_library_single target name)
12741274
"${swift_module_dependency_target}"
12751275
${LLVM_COMMON_DEPENDS})
12761276

1277-
# HACK: On some systems or build directory setups, CMake will not find static
1278-
# archives of Clang libraries in the Clang build directory, and it will pass
1279-
# them as '-lclangFoo'. Some other logic in CMake would reorder libraries
1280-
# specified with this syntax, which breaks linking.
1281-
set(prefixed_link_libraries)
1282-
foreach(dep ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
1283-
if("${dep}" MATCHES "^clang")
1284-
if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS")
1285-
set(dep "${LLVM_LIBRARY_OUTPUT_INTDIR}/${dep}.lib")
1286-
else()
1287-
set(dep "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
1288-
endif()
1289-
endif()
1290-
list(APPEND prefixed_link_libraries "${dep}")
1291-
endforeach()
1292-
set(SWIFTLIB_SINGLE_LINK_LIBRARIES "${prefixed_link_libraries}")
1293-
12941277
if("${libkind}" STREQUAL "SHARED")
12951278
target_link_libraries("${target}" PRIVATE ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
12961279
elseif("${libkind}" STREQUAL "OBJECT")

0 commit comments

Comments
 (0)