Skip to content

Commit a994d65

Browse files
committed
build: remove LLVM_LINK_COMPONENTS in the standard library (NFC)
The standard library does not use the LLVM components. Remove the unused parameter support.
1 parent c29c42f commit a994d65

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ endfunction()
518518
# [LINK_LIBRARIES dep1 ...]
519519
# [FRAMEWORK_DEPENDS dep1 ...]
520520
# [FRAMEWORK_DEPENDS_WEAK dep1 ...]
521-
# [LLVM_LINK_COMPONENTS comp1 ...]
522521
# [C_COMPILE_FLAGS flag1...]
523522
# [SWIFT_COMPILE_FLAGS flag1...]
524523
# [LINK_FLAGS flag1...]
@@ -564,9 +563,6 @@ endfunction()
564563
# FRAMEWORK_DEPENDS_WEAK
565564
# System frameworks this library depends on that should be weakly-linked.
566565
#
567-
# LLVM_LINK_COMPONENTS
568-
# LLVM components this library depends on.
569-
#
570566
# C_COMPILE_FLAGS
571567
# Extra compile flags (C, C++, ObjC).
572568
#
@@ -633,7 +629,6 @@ function(_add_swift_target_library_single target name)
633629
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
634630
LINK_FLAGS
635631
LINK_LIBRARIES
636-
LLVM_LINK_COMPONENTS
637632
PRIVATE_LINK_LIBRARIES
638633
SWIFT_COMPILE_FLAGS
639634
MODULE_TARGETS)
@@ -1093,11 +1088,6 @@ function(_add_swift_target_library_single target name)
10931088
endforeach()
10941089
endforeach()
10951090

1096-
if(NOT SWIFTLIB_SINGLE_TARGET_LIBRARY)
1097-
# Call llvm_config() only for libraries that are part of the compiler.
1098-
swift_common_llvm_config("${target}" ${SWIFTLIB_SINGLE_LLVM_LINK_COMPONENTS})
1099-
endif()
1100-
11011091
# Collect compile and link flags for the static and non-static targets.
11021092
# Don't set PROPERTY COMPILE_FLAGS or LINK_FLAGS directly.
11031093
set(c_compile_flags ${SWIFTLIB_SINGLE_C_COMPILE_FLAGS})
@@ -1353,7 +1343,6 @@ endfunction()
13531343
# [SWIFT_MODULE_DEPENDS dep1 ...]
13541344
# [FRAMEWORK_DEPENDS dep1 ...]
13551345
# [FRAMEWORK_DEPENDS_WEAK dep1 ...]
1356-
# [LLVM_LINK_COMPONENTS comp1 ...]
13571346
# [FILE_DEPENDS target1 ...]
13581347
# [TARGET_SDKS sdk1...]
13591348
# [C_COMPILE_FLAGS flag1...]
@@ -1432,9 +1421,6 @@ endfunction()
14321421
# FRAMEWORK_DEPENDS_WEAK
14331422
# System frameworks this library depends on that should be weak-linked
14341423
#
1435-
# LLVM_LINK_COMPONENTS
1436-
# LLVM components this library depends on.
1437-
#
14381424
# FILE_DEPENDS
14391425
# Additional files this library depends on.
14401426
#
@@ -1525,7 +1511,6 @@ function(add_swift_target_library name)
15251511
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
15261512
LINK_FLAGS
15271513
LINK_LIBRARIES
1528-
LLVM_LINK_COMPONENTS
15291514
PRIVATE_LINK_LIBRARIES
15301515
SWIFT_COMPILE_FLAGS
15311516
SWIFT_COMPILE_FLAGS_IOS
@@ -1943,7 +1928,6 @@ function(add_swift_target_library name)
19431928
LINK_LIBRARIES ${swiftlib_link_libraries}
19441929
FRAMEWORK_DEPENDS ${swiftlib_framework_depends_flattened}
19451930
FRAMEWORK_DEPENDS_WEAK ${SWIFTLIB_FRAMEWORK_DEPENDS_WEAK}
1946-
LLVM_LINK_COMPONENTS ${SWIFTLIB_LLVM_LINK_COMPONENTS}
19471931
FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
19481932
C_COMPILE_FLAGS ${swiftlib_c_compile_flags_all}
19491933
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)
22672251
SDK)
22682252
set(multiple_parameter_options
22692253
COMPILE_FLAGS
2270-
DEPENDS
2271-
LLVM_LINK_COMPONENTS)
2254+
DEPENDS)
22722255
cmake_parse_arguments(SWIFTEXE_SINGLE
22732256
"${options}"
22742257
"${single_parameter_options}"
@@ -2373,8 +2356,6 @@ function(_add_swift_target_executable_single name)
23732356
BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
23742357
LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})
23752358

2376-
swift_common_llvm_config("${name}" ${SWIFTEXE_SINGLE_LLVM_LINK_COMPONENTS})
2377-
23782359
# NOTE(compnerd) use the C linker language to invoke `clang` rather than
23792360
# `clang++` as we explicitly link against the C++ runtime. We were previously
23802361
# actually passing `-nostdlib++` to avoid the C++ runtime linkage.
@@ -2398,7 +2379,7 @@ function(add_swift_target_executable name)
23982379
cmake_parse_arguments(SWIFTEXE_TARGET
23992380
"EXCLUDE_FROM_ALL;;BUILD_WITH_STDLIB"
24002381
""
2401-
"DEPENDS;LLVM_LINK_COMPONENTS;LINK_LIBRARIES"
2382+
"DEPENDS;LINK_LIBRARIES"
24022383
${ARGN})
24032384

24042385
set(SWIFTEXE_TARGET_SOURCES ${SWIFTEXE_TARGET_UNPARSED_ARGUMENTS})
@@ -2431,7 +2412,6 @@ function(add_swift_target_executable name)
24312412
${VARIANT_NAME}
24322413
${SWIFTEXE_TARGET_SOURCES}
24332414
DEPENDS ${SWIFTEXE_TARGET_DEPENDS_with_suffix}
2434-
LLVM_LINK_COMPONENTS ${SWIFTEXE_TARGET_LLVM_LINK_COMPONENTS}
24352415
SDK "${sdk}"
24362416
ARCHITECTURE "${arch}")
24372417

0 commit comments

Comments
 (0)