@@ -467,16 +467,20 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
467
467
468
468
set(sdk_dir " ${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}/usr/lib/swift ")
469
469
470
- # HostCompatibilityLibs is defined as an interface library that
471
- # does not generate any concrete build target
472
- # (https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries)
473
- # In order to specify a dependency to it using `add_dependencies`
474
- # we need to manually " expand " its underlying targets
475
- get_property(compatibility_libs
476
- TARGET HostCompatibilityLibs
477
- PROPERTY INTERFACE_LINK_LIBRARIES)
478
- set(compatibility_libs_path
479
- " ${SWIFTLIB_DIR} /${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}/${SWIFT_HOST_VARIANT_ARCH} ")
470
+ # Note we only check this for bootstrapping, since you ought to
471
+ # be able to build using hosttools with the stdlib disabled.
472
+ if(ASRLF_BOOTSTRAPPING_MODE MATCHES " BOOTSTRAPPING.* ")
473
+ # HostCompatibilityLibs is defined as an interface library that
474
+ # does not generate any concrete build target
475
+ # (https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries)
476
+ # In order to specify a dependency to it using `add_dependencies`
477
+ # we need to manually " expand " its underlying targets
478
+ get_property(compatibility_libs
479
+ TARGET HostCompatibilityLibs
480
+ PROPERTY INTERFACE_LINK_LIBRARIES)
481
+ set(compatibility_libs_path
482
+ " ${SWIFTLIB_DIR} /${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}/${SWIFT_HOST_VARIANT_ARCH} ")
483
+ endif()
480
484
481
485
# If we found a swift compiler and are going to use swift code in swift
482
486
# host side tools but link with clang, add the appropriate -L paths so we
0 commit comments