From a994d65b3e06cfc6c6345eb735c058a1b1348799 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 5 May 2020 14:17:35 -0700 Subject: [PATCH] build: remove `LLVM_LINK_COMPONENTS` in the standard library (NFC) The standard library does not use the LLVM components. Remove the unused parameter support. --- stdlib/cmake/modules/AddSwiftStdlib.cmake | 24 ++--------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 89cd9a19c2667..9e89f6a1618d4 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -518,7 +518,6 @@ endfunction() # [LINK_LIBRARIES dep1 ...] # [FRAMEWORK_DEPENDS dep1 ...] # [FRAMEWORK_DEPENDS_WEAK dep1 ...] -# [LLVM_LINK_COMPONENTS comp1 ...] # [C_COMPILE_FLAGS flag1...] # [SWIFT_COMPILE_FLAGS flag1...] # [LINK_FLAGS flag1...] @@ -564,9 +563,6 @@ endfunction() # FRAMEWORK_DEPENDS_WEAK # System frameworks this library depends on that should be weakly-linked. # -# LLVM_LINK_COMPONENTS -# LLVM components this library depends on. -# # C_COMPILE_FLAGS # Extra compile flags (C, C++, ObjC). # @@ -633,7 +629,6 @@ function(_add_swift_target_library_single target name) INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY LINK_FLAGS LINK_LIBRARIES - LLVM_LINK_COMPONENTS PRIVATE_LINK_LIBRARIES SWIFT_COMPILE_FLAGS MODULE_TARGETS) @@ -1093,11 +1088,6 @@ function(_add_swift_target_library_single target name) endforeach() endforeach() - if(NOT SWIFTLIB_SINGLE_TARGET_LIBRARY) - # Call llvm_config() only for libraries that are part of the compiler. - swift_common_llvm_config("${target}" ${SWIFTLIB_SINGLE_LLVM_LINK_COMPONENTS}) - endif() - # Collect compile and link flags for the static and non-static targets. # Don't set PROPERTY COMPILE_FLAGS or LINK_FLAGS directly. set(c_compile_flags ${SWIFTLIB_SINGLE_C_COMPILE_FLAGS}) @@ -1353,7 +1343,6 @@ endfunction() # [SWIFT_MODULE_DEPENDS dep1 ...] # [FRAMEWORK_DEPENDS dep1 ...] # [FRAMEWORK_DEPENDS_WEAK dep1 ...] -# [LLVM_LINK_COMPONENTS comp1 ...] # [FILE_DEPENDS target1 ...] # [TARGET_SDKS sdk1...] # [C_COMPILE_FLAGS flag1...] @@ -1432,9 +1421,6 @@ endfunction() # FRAMEWORK_DEPENDS_WEAK # System frameworks this library depends on that should be weak-linked # -# LLVM_LINK_COMPONENTS -# LLVM components this library depends on. -# # FILE_DEPENDS # Additional files this library depends on. # @@ -1525,7 +1511,6 @@ function(add_swift_target_library name) INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY LINK_FLAGS LINK_LIBRARIES - LLVM_LINK_COMPONENTS PRIVATE_LINK_LIBRARIES SWIFT_COMPILE_FLAGS SWIFT_COMPILE_FLAGS_IOS @@ -1943,7 +1928,6 @@ function(add_swift_target_library name) LINK_LIBRARIES ${swiftlib_link_libraries} FRAMEWORK_DEPENDS ${swiftlib_framework_depends_flattened} FRAMEWORK_DEPENDS_WEAK ${SWIFTLIB_FRAMEWORK_DEPENDS_WEAK} - LLVM_LINK_COMPONENTS ${SWIFTLIB_LLVM_LINK_COMPONENTS} FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets} C_COMPILE_FLAGS ${swiftlib_c_compile_flags_all} SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all} ${swiftlib_swift_compile_flags_arch} ${swiftlib_swift_compile_private_frameworks_flag} @@ -2267,8 +2251,7 @@ function(_add_swift_target_executable_single name) SDK) set(multiple_parameter_options COMPILE_FLAGS - DEPENDS - LLVM_LINK_COMPONENTS) + DEPENDS) cmake_parse_arguments(SWIFTEXE_SINGLE "${options}" "${single_parameter_options}" @@ -2373,8 +2356,6 @@ function(_add_swift_target_executable_single name) BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR} LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR}) - swift_common_llvm_config("${name}" ${SWIFTEXE_SINGLE_LLVM_LINK_COMPONENTS}) - # NOTE(compnerd) use the C linker language to invoke `clang` rather than # `clang++` as we explicitly link against the C++ runtime. We were previously # actually passing `-nostdlib++` to avoid the C++ runtime linkage. @@ -2398,7 +2379,7 @@ function(add_swift_target_executable name) cmake_parse_arguments(SWIFTEXE_TARGET "EXCLUDE_FROM_ALL;;BUILD_WITH_STDLIB" "" - "DEPENDS;LLVM_LINK_COMPONENTS;LINK_LIBRARIES" + "DEPENDS;LINK_LIBRARIES" ${ARGN}) set(SWIFTEXE_TARGET_SOURCES ${SWIFTEXE_TARGET_UNPARSED_ARGUMENTS}) @@ -2431,7 +2412,6 @@ function(add_swift_target_executable name) ${VARIANT_NAME} ${SWIFTEXE_TARGET_SOURCES} DEPENDS ${SWIFTEXE_TARGET_DEPENDS_with_suffix} - LLVM_LINK_COMPONENTS ${SWIFTEXE_TARGET_LLVM_LINK_COMPONENTS} SDK "${sdk}" ARCHITECTURE "${arch}")