Skip to content

Commit 2f2ce13

Browse files
authored
Merge pull request swiftlang#20107 from compnerd/frontend-is-not-cc
2 parents f6558d7 + d4ea278 commit 2f2ce13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,16 +818,16 @@ function(_add_swift_library_single target name)
818818
endif()
819819

820820
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
821-
swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
822821
if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
823822
swift_windows_generate_sdk_vfs_overlay(SWIFTLIB_SINGLE_VFS_OVERLAY_FLAGS)
824823
foreach(flag ${SWIFTLIB_SINGLE_VFS_OVERLAY_FLAGS})
825824
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xcc;${flag})
826825
list(APPEND SWIFTLIB_SINGLE_C_COMPILE_FLAGS ${flag})
827826
endforeach()
828827
endif()
828+
swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
829829
foreach(directory ${SWIFTLIB_INCLUDE})
830-
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xfrontend;-I${directory})
830+
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xcc;-isystem;-Xcc;${directory})
831831
endforeach()
832832
if("${SWIFTLIB_SINGLE_ARCHITECTURE}" MATCHES arm)
833833
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS -Xcc;-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)

0 commit comments

Comments
 (0)