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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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@"
|
||||
|
||||
Reference in New Issue
Block a user