Skip to content

Commit c813732

Browse files
authored
Pass include paths when emitting macOS swiftmodule for zippered libraries (#34547)
This matches the behaviour for emitting macCatalyst swiftmodules and should avoid preferring dependencies from the SDK instead of just built ones. Addresses rdar://70682224
1 parent 0f00ea1 commit c813732

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,12 @@ function(_compile_swift_files
664664
math(EXPR old_interface_file_index "${interface_file_index} + 1")
665665
list(REMOVE_AT maccatalyst_swift_module_flags ${old_interface_file_index})
666666
endif()
667+
668+
# We still need to change the main swift flags
669+
# so we can use the correct modules
670+
# when building for macOS
671+
list(APPEND swift_flags
672+
"-I" "${SWIFTLIB_DIR}/${library_subdir}")
667673
elseif(maccatalyst_build_flavor STREQUAL "ios-like")
668674
compute_library_subdir(maccatalyst_library_subdir
669675
"MACCATALYST" "${SWIFTFILE_ARCHITECTURE}")

0 commit comments

Comments
 (0)