Skip to content

Commit 0bd975a

Browse files
authored
Merge pull request #83594 from compnerd/c++
2 parents b4d843f + 3c61052 commit 0bd975a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Runtimes/Overlay/Cxx/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2+
include(CheckSymbolExists)
3+
check_symbol_exists(_LIBCPP_VERSION "version" HAVE_LIBCPP_VERSION)
4+
check_symbol_exists(__GLIBCXX__ "version" HAVE___GLIBCXX__)
5+
26
if(NOT APPLE)
37
add_subdirectory(cxxshim)
48
endif()
5-
if(LINUX)
9+
if(HAVE___GLIBCXX__)
610
add_subdirectory(libstdcxx)
711
endif()
812
add_subdirectory(std)

Runtimes/Overlay/Cxx/std/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target_compile_options(swiftCxxStdlib PRIVATE
2222
target_compile_options(swiftCxxStdlib PRIVATE
2323
"$<$<PLATFORM_ID:Android>:SHELL:-Xcc --sysroot -Xcc ${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/sysroot>")
2424
target_link_libraries(swiftCxxStdlib PRIVATE
25-
$<$<PLATFORM_ID:Linux>:libstdcxx>
25+
$<$<BOOL:${HAVE___GLIBCXX__}>:libstdcxx>
2626
$<$<NOT:$<PLATFORM_ID:Darwin>>:cxxshim>
2727
swiftCxx
2828
swiftCore

0 commit comments

Comments
 (0)