File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -98,13 +98,6 @@ function(add_swift_compiler_modules_library name)
98
98
"DEPENDS"
99
99
${ARGN} )
100
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
- set (cxx_interop_flag "-enable-experimental-cxx-interop" )
104
- else ()
105
- set (cxx_interop_flag "-cxx-interoperability-mode=default" )
106
- endif ()
107
-
108
101
set (swift_compile_options
109
102
"-color-diagnostics"
110
103
"-Xfrontend" "-validate-tbd-against-ir=none"
@@ -113,6 +106,12 @@ function(add_swift_compiler_modules_library name)
113
106
"-Xcc" "-std=c++17"
114
107
"-Xcc" "-DCOMPILED_WITH_SWIFT" "-Xcc" "-DSWIFT_TARGET"
115
108
"-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable" )
109
+ # Prior to 5.9, we have to use the experimental flag for C++ interop.
110
+ if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9 )
111
+ list (APPEND swift_compile_options "-Xfrontend" "-enable-experimental-cxx-interop" )
112
+ else ()
113
+ list (APPEND swift_compile_options "-cxx-interoperability-mode=default" )
114
+ endif ()
116
115
117
116
if (NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" )
118
117
if (SWIFT_MIN_RUNTIME_VERSION )
Original file line number Diff line number Diff line change @@ -94,17 +94,9 @@ foreach(c_include_path ${c_include_paths})
94
94
list (APPEND c_include_paths_args "SHELL: -Xcc -I -Xcc ${c_include_path} " )
95
95
endforeach ()
96
96
97
- # Prior to 5.9, we have to use the experimental flag for C++ interop.
98
- if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9 )
99
- set (cxx_interop_flag "-enable-experimental-cxx-interop" )
100
- else ()
101
- set (cxx_interop_flag "-cxx-interoperability-mode=default" )
102
- endif ()
103
-
104
97
set (compile_options
105
98
${c_include_paths_args}
106
99
"SHELL: -DRESILIENT_SWIFT_SYNTAX"
107
- "SHELL: ${cxx_interop_flag} "
108
100
"SHELL: -Xcc -std=c++17 -Xcc -DCOMPILED_WITH_SWIFT"
109
101
110
102
# FIXME: Needed to work around an availability issue with CxxStdlib
@@ -116,6 +108,13 @@ set(compile_options
116
108
"SHELL:-Xcc -D_CRT_USE_BUILTIN_OFFSETOF"
117
109
)
118
110
111
+ # Prior to 5.9, we have to use the experimental flag for C++ interop.
112
+ if (CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.9 )
113
+ list (APPEND compile_options "-Xfrontend" "-enable-experimental-cxx-interop" )
114
+ else ()
115
+ list (APPEND compile_options "-cxx-interoperability-mode=default" )
116
+ endif ()
117
+
119
118
if (SWIFT_BUILD_SWIFT_SYNTAX )
120
119
foreach (target swiftASTGen swiftLLVMJSON swiftIDEUtilsBridging )
121
120
target_compile_options (${target} PRIVATE ${compile_options} )
You can’t perform that action at this time.
0 commit comments