diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-10-13 23:48:28 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-10-13 23:48:28 +0000 |
commit | a66a7b30ce3624a849867ad39ac62fb8944eb141 (patch) | |
tree | d927ac51947a3f5bf5f980bf41f53450f558c933 /libcxx/test | |
parent | 7df337f85c78e64c3fb2d36c859212e8d06f7725 (diff) | |
download | bcm5719-llvm-a66a7b30ce3624a849867ad39ac62fb8944eb141.tar.gz bcm5719-llvm-a66a7b30ce3624a849867ad39ac62fb8944eb141.zip |
ABI versioning macros for libc++.
C++ macros and CMake options that specify the default ABI version of
the library, and can be overridden to pick up new ABI-changing
features.
llvm-svn: 250254
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | libcxx/test/libcxx/test/config.py | 10 | ||||
-rw-r--r-- | libcxx/test/lit.site.cfg.in | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index 60dd7c276c9..3f0ff9a0cc6 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -13,6 +13,7 @@ pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS) pythonize_bool(LIBCXX_ENABLE_RTTI) pythonize_bool(LIBCXX_ENABLE_SHARED) pythonize_bool(LIBCXX_BUILD_32_BITS) +pythonize_bool(LIBCXX_ABI_UNSTABLE) pythonize_bool(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE) pythonize_bool(LIBCXX_ENABLE_STDIN) pythonize_bool(LIBCXX_ENABLE_STDOUT) diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index e0f2f5b4941..3cc1d3b80f3 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -387,6 +387,7 @@ class Configuration(object): # Configure feature flags. self.configure_compile_flags_exceptions() self.configure_compile_flags_rtti() + self.configure_compile_flags_abi_version() self.configure_compile_flags_no_global_filesystem_namespace() self.configure_compile_flags_no_stdin() self.configure_compile_flags_no_stdout() @@ -440,6 +441,15 @@ class Configuration(object): self.config.available_features.add('libcpp-no-rtti') self.cxx.compile_flags += ['-fno-rtti', '-D_LIBCPP_NO_RTTI'] + def configure_compile_flags_abi_version(self): + abi_version = self.get_lit_conf('abi_version', '').strip() + abi_unstable = self.get_lit_bool('abi_unstable') + if abi_version: + self.cxx.compile_flags += ['-D_LIBCPP_ABI_VERSION=' + abi_version] + if abi_unstable: + self.config.available_features.add('libcpp-abi-unstable') + self.cxx.compile_flags += ['-D_LIBCPP_ABI_UNSTABLE'] + def configure_compile_flags_no_global_filesystem_namespace(self): enable_global_filesystem_namespace = self.get_lit_bool( 'enable_global_filesystem_namespace', True) diff --git a/libcxx/test/lit.site.cfg.in b/libcxx/test/lit.site.cfg.in index 765ee7c5341..997f9dc0f75 100644 --- a/libcxx/test/lit.site.cfg.in +++ b/libcxx/test/lit.site.cfg.in @@ -7,6 +7,8 @@ config.enable_exceptions = "@LIBCXX_ENABLE_EXCEPTIONS@" config.enable_rtti = "@LIBCXX_ENABLE_RTTI@" config.enable_shared = "@LIBCXX_ENABLE_SHARED@" config.enable_32bit = "@LIBCXX_BUILD_32_BITS@" +config.abi_version = "@LIBCXX_ABI_VERSION@" +config.abi_unstable = "@LIBCXX_ABI_UNSTABLE@" config.enable_global_filesystem_namespace = "@LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE@" config.enable_stdin = "@LIBCXX_ENABLE_STDIN@" config.enable_stdout = "@LIBCXX_ENABLE_STDOUT@" |