Add and test libc++experimental.
Test: ./run_tests.py --bitness 32 Test: ./run_tests.py --bitness 64 Test: ./run_tests.py --bitness 64 --host Bug: None Change-Id: I9f712f8f73a8335aadf82af6686158de819442be
This commit is contained in:
78
Android.bp
78
Android.bp
@@ -14,10 +14,47 @@
|
|||||||
// limitations under the License.
|
// 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
|
// host + device static lib
|
||||||
cc_library_static {
|
cc_library_static {
|
||||||
name: "libc++_static",
|
name: "libc++_static",
|
||||||
host_supported: true,
|
defaults: ["libc++ defaults"],
|
||||||
vendor_available: true,
|
vendor_available: true,
|
||||||
recovery_available: true,
|
recovery_available: true,
|
||||||
srcs: [
|
srcs: [
|
||||||
@@ -52,43 +89,15 @@ cc_library_static {
|
|||||||
"src/variant.cpp",
|
"src/variant.cpp",
|
||||||
"src/vector.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: [
|
whole_static_libs: [
|
||||||
"libc++abi",
|
"libc++abi",
|
||||||
],
|
],
|
||||||
stl: "none",
|
|
||||||
target: {
|
target: {
|
||||||
linux_bionic: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
windows: {
|
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: [
|
srcs: [
|
||||||
"src/support/win32/*.cpp",
|
"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.
|
// This target is used to extract the build commands for a test executable.
|
||||||
// See run_tests.py.
|
// See run_tests.py.
|
||||||
cc_binary {
|
cc_binary {
|
||||||
@@ -151,6 +168,9 @@ cc_binary {
|
|||||||
// http://llvm.org/bugs/show_bug.cgi?id=21421
|
// http://llvm.org/bugs/show_bug.cgi?id=21421
|
||||||
"-O0",
|
"-O0",
|
||||||
],
|
],
|
||||||
|
static_libs: [
|
||||||
|
"libc++experimental",
|
||||||
|
],
|
||||||
rtti: true,
|
rtti: true,
|
||||||
local_include_dirs: [
|
local_include_dirs: [
|
||||||
"test/support",
|
"test/support",
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class Configuration(libcxx.test.config.Configuration):
|
|||||||
|
|
||||||
def configure_features(self):
|
def configure_features(self):
|
||||||
self.config.available_features.add('long_tests')
|
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])')
|
std_pattern = re.compile(r'-std=(c\+\+\d[0-9x-z])')
|
||||||
match = std_pattern.search(self.cxx.cxx_template)
|
match = std_pattern.search(self.cxx.cxx_template)
|
||||||
if match:
|
if match:
|
||||||
|
|||||||
Reference in New Issue
Block a user