summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2019-01-09 23:28:52 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-01-09 23:28:52 -0800
commit5b1727ad24a04b4c6a1b2ea581fa44f987f6ebef (patch)
tree7bd2275be00d33d85403a466674df7b6bc1707f3
parent91a5a34028727a10d4fd49489556d3106d47ec8d (diff)
parent8f5121bfe488f37ebd315359d0dc5aaaaa596c6b (diff)
downloadlibcxx-5b1727ad24a04b4c6a1b2ea581fa44f987f6ebef.tar.gz
Add and test libc++experimental. am: fc8f268b2c
am: 8f5121bfe4 Change-Id: Id494191ad7ec302b8668f157a3a81d90e470222d
-rw-r--r--Android.bp78
-rw-r--r--utils/libcxx/android/test/config.py1
2 files changed, 50 insertions, 29 deletions
diff --git a/Android.bp b/Android.bp
index cb7b697ca..951e3fc7e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,10 +14,47 @@
// limitations under the License.
//
+cc_defaults {
+ name: "libc++ defaults",
+ host_supported: true,
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+ cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
+ cppflags: [
+ "-std=c++14",
+ "-nostdinc++",
+ "-fexceptions",
+ "-DLIBCXX_BUILDING_LIBCXXABI",
+ "-D_LIBCPP_BUILDING_LIBRARY",
+ ],
+ rtti: true,
+ stl: "none",
+ target: {
+ linux_bionic: {
+ enabled: true,
+ },
+ windows: {
+ enabled: true,
+ cflags: [
+ "-D_LIBCPP_HAS_THREAD_API_WIN32",
+ "-D_LIBCXXABI_BUILDING_LIBRARY",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-UWIN32_LEAN_AND_MEAN",
+ ],
+ },
+ windows_x86: {
+ cflags: [
+ "-fsjlj-exceptions",
+ ],
+ },
+ },
+}
+
// host + device static lib
cc_library_static {
name: "libc++_static",
- host_supported: true,
+ defaults: ["libc++ defaults"],
vendor_available: true,
recovery_available: true,
srcs: [
@@ -52,43 +89,15 @@ cc_library_static {
"src/variant.cpp",
"src/vector.cpp",
],
- local_include_dirs: ["include"],
- export_include_dirs: ["include"],
- cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
- cppflags: [
- "-std=c++14",
- "-nostdinc++",
- "-fexceptions",
- "-DLIBCXX_BUILDING_LIBCXXABI",
- "-D_LIBCPP_BUILDING_LIBRARY",
- ],
- rtti: true,
whole_static_libs: [
"libc++abi",
],
- stl: "none",
target: {
- linux_bionic: {
- enabled: true,
- },
windows: {
- enabled: true,
- cflags: [
- "-D_LIBCPP_HAS_THREAD_API_WIN32",
- "-D_LIBCXXABI_BUILDING_LIBRARY",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-UWIN32_LEAN_AND_MEAN",
- ],
srcs: [
"src/support/win32/*.cpp",
]
},
- windows_x86: {
- cflags: [
- "-fsjlj-exceptions",
- ],
- },
},
}
@@ -129,6 +138,14 @@ cc_library_shared {
},
}
+cc_library_static {
+ name: "libc++experimental",
+ defaults: ["libc++ defaults"],
+ srcs: [
+ "src/experimental/memory_resource.cpp",
+ ],
+}
+
// This target is used to extract the build commands for a test executable.
// See run_tests.py.
cc_binary {
@@ -151,6 +168,9 @@ cc_binary {
// http://llvm.org/bugs/show_bug.cgi?id=21421
"-O0",
],
+ static_libs: [
+ "libc++experimental",
+ ],
rtti: true,
local_include_dirs: [
"test/support",
diff --git a/utils/libcxx/android/test/config.py b/utils/libcxx/android/test/config.py
index 1356f0556..612aa36f8 100644
--- a/utils/libcxx/android/test/config.py
+++ b/utils/libcxx/android/test/config.py
@@ -51,6 +51,7 @@ class Configuration(libcxx.test.config.Configuration):
def configure_features(self):
self.config.available_features.add('long_tests')
+ self.config.available_features.add('c++experimental')
std_pattern = re.compile(r'-std=(c\+\+\d[0-9x-z])')
match = std_pattern.search(self.cxx.cxx_template)
if match: