summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2018-10-11 10:22:40 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-11 10:22:40 -0700
commitb78c8888d4533f7d1820a7d46c506b431da3bcd8 (patch)
treeef5de1ea952de4d8fda9c03caaaa032683811dda
parent89c2e8914edb40148fd5ba8aa354759fa31f60ed (diff)
parent2dc3cf8015f18f17b97cb00d055901e8adb1403f (diff)
downloadlibcxxabi-b78c8888d4533f7d1820a7d46c506b431da3bcd8.tar.gz
Enable libcxxabi for Windows
am: 2dc3cf8015 Change-Id: Ibad0a4b0f7ab4d1d39dc03fb4a5f1f2634f009e9
-rw-r--r--Android.bp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index a73be13..2a84000 100644
--- a/Android.bp
+++ b/Android.bp
@@ -95,6 +95,30 @@ cc_library_static {
cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
enabled: true,
},
+ windows: {
+ enabled: true,
+ cppflags: [
+ "-D_LIBCPP_HAS_THREAD_API_WIN32",
+ "-D_LIBCXXABI_BUILDING_LIBRARY",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ ],
+ exclude_srcs: [
+ "src/cxa_thread_atexit.cpp",
+
+ // Building stdlib_new_delete.cpp in libcxxabi causes
+ // multiple-definition errors against definitions in
+ // libcxx/src/new.cpp on Windows. This works on Linux and
+ // Android where the functions have 'weak' linkage and are
+ // discarded by the linker.
+ "src/stdlib_new_delete.cpp",
+ ],
+ },
+ windows_x86: {
+ cppflags: [
+ "-fsjlj-exceptions",
+ ],
+ }
},
}