File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Swift compiler currently assumes that the Darwin overlay is a dependency of
2
+ # CxxStdlib, and fails to build CxxStdlib if Darwin.swiftmodule in build dir
3
+ # is built with a different (older) version of the compiler. To workaround this,
4
+ # declare the Darwin overlay as a dependency of CxxStdlib.
5
+ set (swift_cxxstdlib_darwin_dependencies )
6
+ if (SWIFT_BUILD_STDLIB AND (SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES ))
7
+ set (swift_cxxstdlib_darwin_dependencies Darwin )
8
+ endif ()
9
+
1
10
#
2
11
# C++ Standard Library Overlay.
3
12
#
@@ -6,6 +15,11 @@ add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB IS_SWIFT_O
6
15
String .swift
7
16
8
17
SWIFT_MODULE_DEPENDS Cxx
18
+ SWIFT_MODULE_DEPENDS_IOS ${swift_cxxstdlib_darwin_dependencies}
19
+ SWIFT_MODULE_DEPENDS_OSX ${swift_cxxstdlib_darwin_dependencies}
20
+ SWIFT_MODULE_DEPENDS_TVOS ${swift_cxxstdlib_darwin_dependencies}
21
+ SWIFT_MODULE_DEPENDS_WATCHOS ${swift_cxxstdlib_darwin_dependencies}
22
+ SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_cxxstdlib_darwin_dependencies}
9
23
10
24
SWIFT_COMPILE_FLAGS ${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS} ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
11
25
-Xfrontend -enable-experimental-cxx-interop
You can’t perform that action at this time.
0 commit comments