Enable libcxxabi for Windows
am: 2dc3cf8015
Change-Id: Ibad0a4b0f7ab4d1d39dc03fb4a5f1f2634f009e9
diff --git a/Android.bp b/Android.bp
index a73be13..2a84000 100644
--- a/Android.bp
+++ b/Android.bp
@@ -95,6 +95,30 @@
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",
+ ],
+ }
},
}