Skip to content

Commit ace3f77

Browse files
committed
[6.2] CMake: make the libswiftCompatibilitySpan symlink relative symlink
Currently we create an absolute one -- this prevents to use the partial toolchain before the installation phase (namely for configurations that run Swift tests on a different device than the builder). Addresses rdar://159314722 (cherry picked from commit 4c6c354, swiftlang#84200)
1 parent 90ee097 commit ace3f77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/core/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
466466
foreach(sdk ${SWIFT_SDKS})
467467
set(lib_dir "${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
468468
set(lib_path "${SWIFTLIB_DIR}/${lib_dir}")
469-
set(compat_lib_name "${lib_path}/libswiftCompatibilitySpan.dylib")
470469

471470
# This doesn't depend on libswiftCore.dylib because we don't actually need
472471
# for it to exist to create the symlink, nor is there any need to recreate
473472
# the symlink if the dylib changes.
474473
add_custom_command_target(unused_var
475474
CUSTOM_TARGET_NAME "swiftCompatibilitySpan-symlink-${lib_dir}"
476-
OUTPUT "${compat_lib_name}"
477-
COMMAND ${CMAKE_COMMAND} "-E" "create_symlink" "${lib_path}/libswiftCore.dylib" "${compat_lib_name}")
475+
OUTPUT "${lib_path}/libswiftCompatibilitySpan.dylib"
476+
COMMAND ${CMAKE_COMMAND} "-E" "create_symlink" "libswiftCore.dylib" "libswiftCompatibilitySpan.dylib"
477+
WORKING_DIRECTORY ${lib_path})
478478
foreach(ARCH ${SWIFT_SDK_${sdk}_ARCHITECTURES})
479479
add_dependencies("swiftCore-${lib_dir}-${ARCH}" "swiftCompatibilitySpan-symlink-${lib_dir}")
480480
endforeach()

0 commit comments

Comments
 (0)