Skip to content

Commit 73b6d04

Browse files
committed
[CMake] Don't export module map for Windows after the first installed SDK arch, as unneeded after swiftlang/swift#79621
1 parent 081798c commit 73b6d04

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/_FoundationCShims/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ add_library(_FoundationCShims STATIC
1919

2020
target_include_directories(_FoundationCShims PUBLIC include)
2121

22-
target_compile_options(_FoundationCShims INTERFACE
23-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/include/module.modulemap>")
22+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT BUILT_FIRST_SDK)
23+
target_compile_options(_FoundationCShims INTERFACE
24+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/include/module.modulemap>")
25+
endif()
2426

2527
set_property(GLOBAL APPEND PROPERTY SWIFT_FOUNDATION_EXPORTS _FoundationCShims)
2628

0 commit comments

Comments
 (0)