Skip to content

Commit 87d4966

Browse files
committed
build: add -Xfrontend to -strict-implicit-module-context
When building with the early swift driver we need to add the explicit `-Xfrontend` to make the option take effect.
1 parent 794a96f commit 87d4966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ function(add_swift_target_library_single target name)
984984
-Xcc;-Xclang;-Xcc;-ivfsoverlay;-Xcc;-Xclang;-Xcc;${SWIFTLIB_SINGLE_VFS_OVERLAY})
985985
endif()
986986
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS
987-
-vfsoverlay;"${SWIFT_WINDOWS_VFS_OVERLAY}";-strict-implicit-module-context;-Xcc;-Xclang;-Xcc;-fbuiltin-headers-in-system-modules)
987+
-vfsoverlay;"${SWIFT_WINDOWS_VFS_OVERLAY}";-Xfrontend;-strict-implicit-module-context;-Xcc;-Xclang;-Xcc;-fbuiltin-headers-in-system-modules)
988988
if(NOT CMAKE_HOST_SYSTEM MATCHES Windows)
989989
swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
990990
foreach(directory ${SWIFTLIB_INCLUDE})
@@ -2912,7 +2912,7 @@ function(_add_swift_target_executable_single name)
29122912

29132913
if(SWIFTEXE_SINGLE_SDK STREQUAL "WINDOWS")
29142914
list(APPEND SWIFTEXE_SINGLE_COMPILE_FLAGS
2915-
-vfsoverlay;"${SWIFT_WINDOWS_VFS_OVERLAY}";-strict-implicit-module-context;-Xcc;-Xclang;-Xcc;-fbuiltin-headers-in-system-modules)
2915+
-vfsoverlay;"${SWIFT_WINDOWS_VFS_OVERLAY}";-Xfrontend;-strict-implicit-module-context;-Xcc;-Xclang;-Xcc;-fbuiltin-headers-in-system-modules)
29162916
endif()
29172917

29182918
if ("${SWIFTEXE_SINGLE_SDK}" STREQUAL "LINUX")

0 commit comments

Comments
 (0)