Skip to content

Commit ccf57da

Browse files
authored
build: Further fixes for Cxx w/o stdlib. (swiftlang#65217)
In swiftlang#65172 I tried to fix a problem when the Cxx module is enabled, but we are not building the stdlib. The fix work for `swiftCxx`, but failed to to realize that `swiftCxxStdlib` overlay is also built, which needs parts of the stdlib. The original swiftlang#65055 only built the Cxx module when `EXTRA_TOOLCHAIN_CONTENT` was set, but swiftlang#65122 changed so it was two independent checks. A more faithful fix will had been to nest the `if` as I am trying to do with this PR. Parts of swiftlang#65172 are still necessary to build in every case, though: the `swiftCxx` target is dependent on the Clang headers and the legacy layouts. Those two pieces are normally in place because of other targets in upstream builds, but fail to materialize when the stdlib is trying to be built with the host compiler. This one and swiftlang#65172 will need to be cherry-picked to 5.9 because swiftlang#65055 and swiftlang#65122 where cherry-picked, so 5.9 is having the same problems as `main`.
1 parent 6aaccf0 commit ccf57da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,10 +1269,10 @@ else()
12691269

12701270
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
12711271
add_subdirectory(stdlib/toolchain)
1272-
endif()
12731272

1274-
if(SWIFT_BUILD_STDLIB_CXX_MODULE)
1275-
add_subdirectory(stdlib/public/Cxx)
1273+
if(SWIFT_BUILD_STDLIB_CXX_MODULE)
1274+
add_subdirectory(stdlib/public/Cxx)
1275+
endif()
12761276
endif()
12771277

12781278
if (BUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES)

0 commit comments

Comments
 (0)