Skip to content

Commit b18148c

Browse files
committed
[CMake] Extend copy-legacy-layouts dependency to swiftmodules
... and other products as well. Before this change, the dependency was enforced only for stdlib object files -- since according to the Ninja dependency graph other libraries can be scheduled as soon as the swiftmodules are ready, there is a chance that we attempt to build those before legacy layours are copied. Addresses rdar://71559791
1 parent 84360d9 commit b18148c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ function(_compile_swift_files
801801
${source_files} ${SWIFTFILE_DEPENDS}
802802
${swift_ide_test_dependency}
803803
${create_dirs_dependency_target}
804+
${copy_legacy_layouts_dep}
804805
COMMENT "Generating ${module_file}")
805806

806807
if(SWIFTFILE_STATIC)
@@ -857,6 +858,7 @@ function(_compile_swift_files
857858
${SWIFTFILE_DEPENDS}
858859
${swift_ide_test_dependency}
859860
${obj_dirs_dependency_target}
861+
${copy_legacy_layouts_dep}
860862
COMMENT
861863
"Generating ${maccatalyst_module_file}")
862864

@@ -880,6 +882,7 @@ function(_compile_swift_files
880882
${swift_compiler_tool_dep}
881883
${source_files} ${SWIFTFILE_DEPENDS}
882884
${create_dirs_dependency_target}
885+
${copy_legacy_layouts_dep}
883886
COMMENT "Generating ${sib_file}"
884887
EXCLUDE_FROM_ALL)
885888
set("${dependency_sib_target_out_var_name}" "${sib_dependency_target}" PARENT_SCOPE)
@@ -896,6 +899,7 @@ function(_compile_swift_files
896899
${swift_compiler_tool_dep}
897900
${source_files} ${SWIFTFILE_DEPENDS}
898901
${create_dirs_dependency_target}
902+
${copy_legacy_layouts_dep}
899903
COMMENT "Generating ${sibopt_file}"
900904
EXCLUDE_FROM_ALL)
901905
set("${dependency_sibopt_target_out_var_name}" "${sibopt_dependency_target}" PARENT_SCOPE)
@@ -913,6 +917,7 @@ function(_compile_swift_files
913917
${swift_compiler_tool_dep}
914918
${source_files} ${SWIFTFILE_DEPENDS}
915919
${create_dirs_dependency_target}
920+
${copy_legacy_layouts_dep}
916921
COMMENT "Generating ${sibgen_file}"
917922
EXCLUDE_FROM_ALL)
918923
set("${dependency_sibgen_target_out_var_name}" "${sibgen_dependency_target}" PARENT_SCOPE)

0 commit comments

Comments
 (0)