Skip to content

build: remove LLVM_LINK_COMPONENTS in the standard library (NFC) #31586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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...]
Expand Down Expand Up @@ -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).
#
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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})
Expand Down Expand Up @@ -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...]
Expand Down Expand Up @@ -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.
#
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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.
Expand All @@ -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})
Expand Down Expand Up @@ -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}")

Expand Down