@@ -440,7 +440,7 @@ function(_add_host_variant_link_flags target)
440440 endif ()
441441endfunction ()
442442
443- function (_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping required_for_minimal_compiler )
443+ function (_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
444444 if (NOT BOOTSTRAPPING_MODE)
445445 if (SWIFT_SWIFT_PARSER)
446446 set (ASRLF_BOOTSTRAPPING_MODE "HOSTTOOLS" )
@@ -550,14 +550,10 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping r
550550 target_link_directories (${target} PRIVATE ${host_lib_dir} )
551551
552552 # At runtime, use swiftCore in the current toolchain.
553+ # For building stdlib, LD_LIBRARY_PATH will be set to builder's stdlib
553554 # FIXME: This assumes the ABI hasn't changed since the builder.
554555 set (swift_runtime_rpath "$ORIGIN/${relpath_to_lib_dir} /swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK} _LIB_SUBDIR}" )
555556
556- if (ASRLF_BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" AND required_for_minimal_compiler)
557- # But before building the stdlib with the tool, use the builder libs. This should be removed in install time.
558- list (APPEND swift_runtime_rpath "${host_lib_dir} " )
559- endif ()
560-
561557 elseif (ASRLF_BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING" )
562558 # At build time link against the built swift libraries from the
563559 # previous bootstrapping stage.
@@ -745,7 +741,7 @@ function(add_swift_host_library name)
745741 _set_target_prefix_and_suffix(${name} "${libkind} " "${SWIFT_HOST_VARIANT_SDK} " )
746742
747743 if (ASHL_SHARED AND ASHL_HAS_SWIFT_MODULES)
748- _add_swift_runtime_link_flags(${name} "." "" FALSE )
744+ _add_swift_runtime_link_flags(${name} "." "" )
749745 endif ()
750746
751747 # Set compilation and link flags.
@@ -839,7 +835,6 @@ endmacro()
839835# add_swift_host_tool(name
840836# [HAS_SWIFT_MODULES]
841837# [THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY]
842- # [REQUIRED_FOR_MINIMAL_COMPILER]
843838#
844839# [BOOTSTRAPPING 0|1]
845840# [SWIFT_COMPONENT component]
@@ -855,9 +850,6 @@ endmacro()
855850# THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY
856851# Opt-out of LLVM IR optimizations when linking ThinLTO with ld64
857852#
858- # REQUIRED_FOR_MINIMAL_COMPILER
859- # Required for building standard libraries.
860- #
861853# BOOTSTRAPPING
862854# Bootstrapping stage.
863855#
@@ -870,7 +862,7 @@ endmacro()
870862# source1 ...
871863# Sources to add into this executable.
872864function (add_swift_host_tool executable)
873- set (options HAS_SWIFT_MODULES THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY REQUIRED_FOR_MINIMAL_COMPILER )
865+ set (options HAS_SWIFT_MODULES THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY)
874866 set (single_parameter_options SWIFT_COMPONENT BOOTSTRAPPING)
875867 set (multiple_parameter_options LLVM_LINK_COMPONENTS)
876868
@@ -931,7 +923,7 @@ function(add_swift_host_tool executable)
931923 endif ()
932924
933925 if (ASHT_HAS_SWIFT_MODULES)
934- _add_swift_runtime_link_flags(${executable} "../lib" "${ASHT_BOOTSTRAPPING} " " ${ASHT_REQUIRED_FOR_MINIMAL_COMPILER} " )
926+ _add_swift_runtime_link_flags(${executable} "../lib" "${ASHT_BOOTSTRAPPING} " )
935927 endif ()
936928
937929 llvm_update_compile_flags(${executable} )
@@ -1007,14 +999,6 @@ function(add_swift_host_tool executable)
1007999 COMPONENT ${ASHT_SWIFT_COMPONENT}
10081000 )
10091001
1010- if (ASHT_REQUIRED_FOR_MINIMAL_COMPILER)
1011- swift_install_strip_builder_rpath(
1012- TARGETS ${executable}
1013- DESTINATION bin
1014- COMPONENT ${ASHT_SWIFT_COMPONENT}
1015- )
1016- endif ()
1017-
10181002 swift_is_installing_component(${ASHT_SWIFT_COMPONENT} is_installing)
10191003 endif ()
10201004
0 commit comments