@@ -18,7 +18,7 @@ if(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER)
1818 list (APPEND ASTGen_Swift_dependencies _CompilerRegexParser)
1919endif ()
2020
21- add_pure_swift_host_library(swiftASTGen STATIC
21+ add_pure_swift_host_library(swiftASTGen STATIC CXX_INTEROP
2222 Sources /ASTGen/ASTGen.swift
2323 Sources /ASTGen/ASTGen+CompilerBuildConfiguration.swift
2424 Sources /ASTGen/Bridge.swift
@@ -52,7 +52,7 @@ add_pure_swift_host_library(swiftASTGen STATIC
5252 ${ASTGen_Swift_dependencies}
5353)
5454
55- add_pure_swift_host_library(swiftMacros STATIC
55+ add_pure_swift_host_library(swiftMacros STATIC CXX_INTEROP
5656 Sources /Macros /Macros .swift
5757 Sources /Macros /PluginHost.swift
5858 Sources /Macros /SourceManager.swift
@@ -69,44 +69,14 @@ add_pure_swift_host_library(swiftMacros STATIC
6969 swiftASTGen
7070)
7171
72- add_pure_swift_host_library(swiftIDEUtilsBridging
72+ add_pure_swift_host_library(swiftIDEUtilsBridging CXX_INTEROP
7373 Sources /SwiftIDEUtilsBridging/NameMatcherBridging.swift
7474
7575 DEPENDENCIES
7676 swiftAST
7777 SWIFT_DEPENDENCIES
7878 _CompilerSwiftIDEUtils
7979 _CompilerSwiftSyntax
80+ _CompilerSwiftIDEUtils
8081 swiftASTGen
8182)
82-
83- set (compile_options
84- "SHELL: -Xcc -std=c++17 -Xcc -DCOMPILED_WITH_SWIFT"
85-
86- # FIXME: Needed to work around an availability issue with CxxStdlib
87- "SHELL: -Xfrontend -disable-target-os-checking"
88-
89- # Necessary to avoid treating IBOutlet and IBAction as keywords
90- "SHELL:-Xcc -UIBOutlet -Xcc -UIBAction -Xcc -UIBInspectable"
91- )
92-
93- if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
94- list (APPEND compile_options
95- # Make 'offsetof()' a const value.
96- "SHELL:-Xcc -D_CRT_USE_BUILTIN_OFFSETOF"
97- # Workaround for https://github.com/swiftlang/llvm-project/issues/7172
98- "SHELL:-Xcc -Xclang -Xcc -fmodule-format=raw" )
99- endif ()
100-
101- # Prior to 5.9, we have to use the experimental flag for C++ interop.
102- if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9)
103- list (APPEND compile_options "SHELL:-Xfrontend -enable-experimental-cxx-interop" )
104- else ()
105- list (APPEND compile_options "-cxx-interoperability-mode=default" )
106- endif ()
107-
108- if (SWIFT_BUILD_SWIFT_SYNTAX)
109- foreach (target swiftASTGen swiftIDEUtilsBridging swiftMacros)
110- target_compile_options (${target} PRIVATE ${compile_options} )
111- endforeach ()
112- endif ()
0 commit comments