Skip to content

Commit 36a7e93

Browse files
committed
[build-script] Fix issue with installing SwiftSyntax if target dir does not exist
1 parent c4814cb commit 36a7e93

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

utils/build-script-impl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,7 +3443,7 @@ for host in "${ALL_HOSTS[@]}"; do
34433443
if [ "${BUILD_LIBPARSER_ONLY}" ]; then
34443444
# We don't have a toolchain so we should install to the specified dir
34453445
DYLIB_DIR="${INSTALL_DESTDIR}"
3446-
MODULE_DIR="${INSTALL_DESTDIR}/${product}.swiftmodule/${SWIFT_HOST_VARIANT_ARCH}"
3446+
MODULE_DIR="${INSTALL_DESTDIR}/${product}.swiftmodule"
34473447
# Create the install dir if it doesn't exist
34483448
call mkdir -p "${INSTALL_DESTDIR}"
34493449
# Install libParser is necessary
@@ -3453,14 +3453,15 @@ for host in "${ALL_HOSTS[@]}"; do
34533453
else
34543454
# We have a toolchain so install to the toolchain
34553455
DYLIB_DIR="${host_install_destdir}${host_install_prefix}/lib/swift/${SWIFT_HOST_VARIANT}"
3456-
MODULE_DIR="${DYLIB_DIR}/${product}.swiftmodule/${SWIFT_HOST_VARIANT_ARCH}"
3456+
MODULE_DIR="${DYLIB_DIR}/${product}.swiftmodule"
34573457
fi
34583458
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
34593459
continue
34603460
fi
34613461
set_swiftsyntax_build_command
34623462
if [[ -z "${SKIP_INSTALL_SWIFTSYNTAX_MODULE}" ]] ; then
3463-
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --swiftmodule-base-name "${MODULE_DIR}" --install
3463+
mkdir -p "${MODULE_DIR}"
3464+
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --swiftmodule-base-name "${MODULE_DIR}/${SWIFT_HOST_VARIANT_ARCH}" --install
34643465
else
34653466
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --install
34663467
fi

0 commit comments

Comments
 (0)