aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2018-06-14 00:53:15 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2018-06-14 01:00:17 +0200
commitcbdf132edf885adfcc527f0f1cb40df29e089c14 (patch)
tree66343d9422f3001d117f5e03cad227643421793b
parentf423280a90a34cd04ec3cf34eaeb18cff83aad10 (diff)
Skeleton of libcxxabi's usage.
-rw-r--r--.gitmodules8
-rw-r--r--Makefile50
-rw-r--r--build.yaml30
-rw-r--r--grpc.gyp26
-rw-r--r--templates/Makefile.template5
m---------third_party/libcxx0
m---------third_party/libcxxabi0
-rw-r--r--tools/run_tests/generated/sources_and_headers.json10
8 files changed, 128 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules
index 52db29be00..afde4d34f3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -34,3 +34,11 @@
[submodule "third_party/abseil-cpp"]
path = third_party/abseil-cpp
url = https://github.com/abseil/abseil-cpp
+[submodule "third_party/libcxxabi"]
+ path = third_party/libcxxabi
+ url = https://github.com/llvm-mirror/libcxxabi.git
+ branch = release_60
+[submodule "third_party/libcxx"]
+ path = third_party/libcxx
+ url = https://github.com/llvm-mirror/libcxx.git
+ branch = release_60
diff --git a/Makefile b/Makefile
index 1247566ffe..a1abc5e868 100644
--- a/Makefile
+++ b/Makefile
@@ -1372,7 +1372,7 @@ plugins: $(PROTOC_PLUGINS)
privatelibs: privatelibs_c privatelibs_cxx
-privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a
+privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a
pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc
pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc
@@ -2847,6 +2847,11 @@ $(OBJDIR)/$(CONFIG)/%.o : %.cc
$(Q) mkdir -p `dirname $@`
$(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
+$(OBJDIR)/$(CONFIG)/%.o : %.cpp
+ $(E) "[CXX] Compiling $<"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
+
install: install_c install_cxx install-plugins install-certs
install_c: install-headers_c install-static_c install-shared_c
@@ -3161,6 +3166,49 @@ endif
endif
+LIBCXXABI_SRC = \
+ third_party/libcxxabi/src/abort_message.cpp \
+ third_party/libcxxabi/src/cxa_aux_runtime.cpp \
+ third_party/libcxxabi/src/cxa_default_handlers.cpp \
+ third_party/libcxxabi/src/cxa_demangle.cpp \
+ third_party/libcxxabi/src/cxa_exception_storage.cpp \
+ third_party/libcxxabi/src/cxa_guard.cpp \
+ third_party/libcxxabi/src/cxa_handlers.cpp \
+ third_party/libcxxabi/src/cxa_noexception.cpp \
+ third_party/libcxxabi/src/cxa_thread_atexit.cpp \
+ third_party/libcxxabi/src/cxa_unexpected.cpp \
+ third_party/libcxxabi/src/cxa_vector.cpp \
+ third_party/libcxxabi/src/cxa_virtual.cpp \
+ third_party/libcxxabi/src/fallback_malloc.cpp \
+ third_party/libcxxabi/src/private_typeinfo.cpp \
+ third_party/libcxxabi/src/stdlib_exception.cpp \
+ third_party/libcxxabi/src/stdlib_new_delete.cpp \
+ third_party/libcxxabi/src/stdlib_stdexcept.cpp \
+ third_party/libcxxabi/src/stdlib_typeinfo.cpp \
+
+PUBLIC_HEADERS_C += \
+
+LIBCXXABI_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBCXXABI_SRC))))
+
+$(LIBCXXABI_OBJS): CPPFLAGS += -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_NO_EXCEPTIONS -Ithird_party/libcxxabi/include -nostdinc++ -Ithird_party/libcxx/include -Wno-unused-but-set-variable -Wno-c++14-compat -fvisibility=hidden
+
+$(LIBDIR)/$(CONFIG)/libcxxabi.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBCXXABI_OBJS)
+ $(E) "[AR] Creating $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libcxxabi.a
+ $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBCXXABI_OBJS)
+ifeq ($(SYSTEM),Darwin)
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libcxxabi.a
+endif
+
+
+
+
+ifneq ($(NO_DEPS),true)
+-include $(LIBCXXABI_OBJS:.o=.dep)
+endif
+
+
LIBGPR_SRC = \
src/core/lib/gpr/alloc.cc \
src/core/lib/gpr/arena.cc \
diff --git a/build.yaml b/build.yaml
index 16c90fbd4c..17a2ebcdfe 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1359,6 +1359,32 @@ libs:
deps:
- grpc
secure: true
+- name: cxxabi
+ build: private
+ language: c
+ src:
+ - third_party/libcxxabi/src/abort_message.cpp
+ - third_party/libcxxabi/src/cxa_aux_runtime.cpp
+ - third_party/libcxxabi/src/cxa_default_handlers.cpp
+ - third_party/libcxxabi/src/cxa_demangle.cpp
+ - third_party/libcxxabi/src/cxa_exception_storage.cpp
+ - third_party/libcxxabi/src/cxa_guard.cpp
+ - third_party/libcxxabi/src/cxa_handlers.cpp
+ - third_party/libcxxabi/src/cxa_noexception.cpp
+ - third_party/libcxxabi/src/cxa_thread_atexit.cpp
+ - third_party/libcxxabi/src/cxa_unexpected.cpp
+ - third_party/libcxxabi/src/cxa_vector.cpp
+ - third_party/libcxxabi/src/cxa_virtual.cpp
+ - third_party/libcxxabi/src/fallback_malloc.cpp
+ - third_party/libcxxabi/src/private_typeinfo.cpp
+ - third_party/libcxxabi/src/stdlib_exception.cpp
+ - third_party/libcxxabi/src/stdlib_new_delete.cpp
+ - third_party/libcxxabi/src/stdlib_stdexcept.cpp
+ - third_party/libcxxabi/src/stdlib_typeinfo.cpp
+ build_system:
+ - Makefile
+ defaults: cxxabi
+ secure: false
- name: gpr
build: all
language: c
@@ -5608,6 +5634,10 @@ defaults:
CPPFLAGS: -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-rtti -fno-exceptions
+ cxxabi:
+ CPPFLAGS: -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_NO_EXCEPTIONS
+ -Ithird_party/libcxxabi/include -nostdinc++ -Ithird_party/libcxx/include -Wno-unused-but-set-variable
+ -Wno-c++14-compat -fvisibility=hidden
global:
COREFLAGS: -fno-rtti -fno-exceptions
CPPFLAGS: -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1
diff --git a/grpc.gyp b/grpc.gyp
index 2ceae3fe36..43e2485289 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -179,6 +179,32 @@
],
},
{
+ 'target_name': 'cxxabi',
+ 'type': 'static_library',
+ 'dependencies': [
+ ],
+ 'sources': [
+ 'third_party/libcxxabi/src/abort_message.cpp',
+ 'third_party/libcxxabi/src/cxa_aux_runtime.cpp',
+ 'third_party/libcxxabi/src/cxa_default_handlers.cpp',
+ 'third_party/libcxxabi/src/cxa_demangle.cpp',
+ 'third_party/libcxxabi/src/cxa_exception_storage.cpp',
+ 'third_party/libcxxabi/src/cxa_guard.cpp',
+ 'third_party/libcxxabi/src/cxa_handlers.cpp',
+ 'third_party/libcxxabi/src/cxa_noexception.cpp',
+ 'third_party/libcxxabi/src/cxa_thread_atexit.cpp',
+ 'third_party/libcxxabi/src/cxa_unexpected.cpp',
+ 'third_party/libcxxabi/src/cxa_vector.cpp',
+ 'third_party/libcxxabi/src/cxa_virtual.cpp',
+ 'third_party/libcxxabi/src/fallback_malloc.cpp',
+ 'third_party/libcxxabi/src/private_typeinfo.cpp',
+ 'third_party/libcxxabi/src/stdlib_exception.cpp',
+ 'third_party/libcxxabi/src/stdlib_new_delete.cpp',
+ 'third_party/libcxxabi/src/stdlib_stdexcept.cpp',
+ 'third_party/libcxxabi/src/stdlib_typeinfo.cpp',
+ ],
+ },
+ {
'target_name': 'gpr',
'type': 'static_library',
'dependencies': [
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 43fa904768..cb8a85ba0a 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -1273,6 +1273,11 @@
$(Q) mkdir -p `dirname $@`
$(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
+ $(OBJDIR)/$(CONFIG)/%.o : %.cpp
+ $(E) "[CXX] Compiling $<"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
+
install: install_c install_cxx install-plugins install-certs
install_c: install-headers_c install-static_c install-shared_c
diff --git a/third_party/libcxx b/third_party/libcxx
new file mode 160000
+Subproject 6599cac0965be8e5a835ab7a5684bbef033d5ad
diff --git a/third_party/libcxxabi b/third_party/libcxxabi
new file mode 160000
+Subproject 9245d481eb3e890f708ff2d7dadf2a10c04748b
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 0af4e19a1a..bdc6cc101c 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -6827,6 +6827,16 @@
"type": "lib"
},
{
+ "deps": [],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c",
+ "name": "cxxabi",
+ "src": [],
+ "third_party": false,
+ "type": "lib"
+ },
+ {
"deps": [
"gpr_base"
],