From bfa5269decaccfd2106ae20cfe32719b4268a3dc Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 27 Mar 2025 15:14:44 -0700 Subject: [PATCH] [SwiftCore] Enable explicit module builds Explicit module builds help prevent the dependency scanner from getting lost and attempting to pull the SwiftShims module from the resource directory, existing SDK, and the just-built standard library. They aren't part of the library interface, but make it possible to build the runtime libraries without seeing duplicate shims. Moving the flag to a top-level compile command. --- Runtimes/Core/CMakeLists.txt | 1 + Runtimes/Core/core/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtimes/Core/CMakeLists.txt b/Runtimes/Core/CMakeLists.txt index c6711d07ab2c0..3f1e73c9fa84b 100644 --- a/Runtimes/Core/CMakeLists.txt +++ b/Runtimes/Core/CMakeLists.txt @@ -176,6 +176,7 @@ add_compile_options( add_link_options($<$:LINKER:/WX>) add_compile_options( + $<$:-explicit-module-build> "$<$:-nostdlibimport>" "$<$:SHELL:-library-level api>" "$<$:SHELL:-runtime-compatibility-version none>" diff --git a/Runtimes/Core/core/CMakeLists.txt b/Runtimes/Core/core/CMakeLists.txt index b842b76c87244..0355d88205c68 100644 --- a/Runtimes/Core/core/CMakeLists.txt +++ b/Runtimes/Core/core/CMakeLists.txt @@ -290,7 +290,6 @@ target_compile_options(swiftCore PRIVATE "$<$:SHELL:-enable-experimental-feature AddressableTypes>" $<$:-parse-stdlib> $<$:-nostdimport> - $<$:-explicit-module-build> "$<$:SHELL:-Xfrontend -group-info-path -Xfrontend ${CMAKE_CURRENT_SOURCE_DIR}/GroupInfo.json>" "$<$:SHELL:-Xfrontend -disable-objc-attr-requires-foundation-module>" "$<$:SHELL:-Xfrontend -require-explicit-availability=ignore>")