Skip to content

Commit 4970946

Browse files
authored
[CMake] Limit copy-legacy-layouts dependency to the stdlib (#22593)
When we do standalone overlay builds, they should rely on these layouts already being in the toolchain. (In particular, the target is never created.) No tests because this configuration isn't (currently) being tested outside of Apple.
1 parent f5bcd7f commit 4970946

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,13 @@ function(_compile_swift_files
440440
#
441441
# See stdlib/CMakeLists.txt and TypeConverter::TypeConverter() in
442442
# lib/IRGen/GenType.cpp.
443-
set(SWIFTFILE_PLATFORM "${SWIFT_SDK_${SWIFTFILE_SDK}_LIB_SUBDIR}")
444-
set(copy_legacy_layouts_dep
445-
"copy-legacy-layouts-${SWIFTFILE_PLATFORM}-${SWIFTFILE_ARCHITECTURE}")
443+
if(SWIFTFILE_IS_STDLIB_CORE)
444+
set(SWIFTFILE_PLATFORM "${SWIFT_SDK_${SWIFTFILE_SDK}_LIB_SUBDIR}")
445+
set(copy_legacy_layouts_dep
446+
"copy-legacy-layouts-${SWIFTFILE_PLATFORM}-${SWIFTFILE_ARCHITECTURE}")
447+
else()
448+
set(copy_legacy_layouts_dep)
449+
endif()
446450

447451
add_custom_command_target(
448452
dependency_target

0 commit comments

Comments
 (0)