Skip to content

Commit daf6858

Browse files
committed
Bootstrapping0: copy all the legacy layouts for the host platform
When cross compiling we are forcing the usage of the resource directory from the bootstrapping0 compiler to ensure we are picking up the stdlib from the SDK. As a result we need to ensure to have legacy layouts for all the architectures in that folder. Addresses rdar://98899578
1 parent f5787c9 commit daf6858

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

stdlib/toolchain/legacy_layouts/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ foreach(sdk ${SWIFT_SDKS})
5656
endforeach()
5757

5858
if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
59-
# Bootstrapping - level 0
60-
add_layout_copying( ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH} "0")
59+
# The resource dir for bootstrapping0 may be used explicitly
60+
# to cross compile for other architectures, so we would need
61+
# to have all the legacy layouts in there
62+
foreach(arch
63+
${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCHITECTURES}
64+
${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_MODULE_ARCHITECTURES})
65+
# Bootstrapping - level 0
66+
add_layout_copying( ${SWIFT_HOST_VARIANT_SDK} ${arch} "0")
67+
endforeach()
6168

6269
# Bootstrapping - level 1
6370
add_layout_copying( ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH} "1")

0 commit comments

Comments
 (0)