Skip to content

Commit 21699b3

Browse files
committed
Bootstrapping: copy all the legacy layouts for the host platforms
The bootstrapping compilers may be used for cross compilation, so we need to ensure to have legacy layouts for all the architectures. Addresses rdar://98899578
1 parent f5787c9 commit 21699b3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

stdlib/toolchain/legacy_layouts/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,16 @@ 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 bootstrapping compilers may be used to cross compile
60+
# for other architectures, so we would need the matching
61+
# resource directories to have all the legacy layouts
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")
6167

62-
# Bootstrapping - level 1
63-
add_layout_copying( ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH} "1")
68+
# Bootstrapping - level 1
69+
add_layout_copying( ${SWIFT_HOST_VARIANT_SDK} ${arch} "1")
70+
endforeach()
6471
endif()

0 commit comments

Comments
 (0)