aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp
diff options
context:
space:
mode:
authordtorilov <dtorilov@yandex-team.com>2024-03-28 12:06:24 +0300
committerdtorilov <dtorilov@yandex-team.com>2024-03-28 12:23:07 +0300
commitf3e9fe69c4cf73fb20f9318787157d299afaf96b (patch)
treeeebb86a782c593e0e010249356b0e8d86702f033 /contrib/libs/cxxsupp
parent53c38fb0156bfb3e5932de44d4a0ed9f47f1cc23 (diff)
downloadydb-f3e9fe69c4cf73fb20f9318787157d299afaf96b.tar.gz
WebAssembly: use libcxxabi in libcxx
67f4a0fd7b5d642bde8db445bc8b902d178272bf
Diffstat (limited to 'contrib/libs/cxxsupp')
-rw-r--r--contrib/libs/cxxsupp/libcxx/ya.make36
1 files changed, 20 insertions, 16 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/ya.make b/contrib/libs/cxxsupp/libcxx/ya.make
index 16db885ad5..bea9e85ca6 100644
--- a/contrib/libs/cxxsupp/libcxx/ya.make
+++ b/contrib/libs/cxxsupp/libcxx/ya.make
@@ -89,7 +89,8 @@ ELSEIF (OS_WINDOWS)
)
ENDIF()
ELSEIF (OS_EMSCRIPTEN)
- DEFAULT(CXX_RT "glibcxx_static")
+ DEFAULT(CXX_RT "libcxxabi")
+ LDFLAGS(-Wl,-Bdynamic)
CXXFLAGS(
-Wno-unknown-pragmas
-nostdinc++
@@ -143,20 +144,13 @@ IF (CXX_RT == "libcxxrt")
# are needed by potentially any code generated by clang.
# With glibcxx runtime, builtins are provided by libgcc
ELSEIF (CXX_RT == "glibcxx_static")
- IF (OS_EMSCRIPTEN)
- LDFLAGS(
- -Wl,-Bstatic
- -Wl,-Bdynamic
- )
- ELSE()
- LDFLAGS(
- -Wl,-Bstatic
- -lsupc++
- -lgcc
- -lgcc_eh
- -Wl,-Bdynamic
- )
- ENDIF()
+ LDFLAGS(
+ -Wl,-Bstatic
+ -lsupc++
+ -lgcc
+ -lgcc_eh
+ -Wl,-Bdynamic
+ )
CXXFLAGS(-D__GLIBCXX__=1)
ENABLE(NEED_GLIBCXX_CXX17_SHIMS)
ENABLE(NEED_CXX_RT_ADDINCL)
@@ -174,8 +168,18 @@ ELSEIF (CXX_RT == "glibcxx_dynamic")
)
ENABLE(NEED_GLIBCXX_CXX17_SHIMS)
ENABLE(NEED_CXX_RT_ADDINCL)
+ELSEIF (CXX_RT == "libcxxabi")
+ PEERDIR(
+ contrib/libs/cxxsupp/libcxxabi
+ )
+ ADDINCL(
+ GLOBAL contrib/libs/cxxsupp/libcxxabi/include
+ )
+ CFLAGS(
+ GLOBAL -DLIBCXX_BUILDING_LIBCXXABI
+ )
ELSEIF (CXX_RT == "default")
-# Do nothing
+ # Do nothing
ELSE()
MESSAGE(FATAL_ERROR "Unexpected CXX_RT value: ${CXX_RT}")
ENDIF()