Add support for building libc++ as a 32 bit library

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2014-12-12 03:12:18 +00:00
parent 01f6a1410c
commit ae9fec0bdf
4 changed files with 14 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ if(PYTHONINTERP_FOUND)
pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)
pythonize_bool(LIBCXX_ENABLE_RTTI)
pythonize_bool(LIBCXX_ENABLE_SHARED)
pythonize_bool(LIBCXX_BUILD_32_BITS)
pythonize_bool(LIBCXX_ENABLE_THREADS)
pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)

View File

@@ -436,6 +436,9 @@ class Configuration(object):
self.config.available_features.add('rtti')
else:
self.compile_flags += ['-fno-rtti', '-D_LIBCPP_NO_RTTI']
enable_32bit = self.get_lit_bool('enable_32bit', False)
if enable_32bit:
self.compile_flags += ['-m32']
# Configure threading features.
enable_threads = self.get_lit_bool('enable_threads', True)
enable_monotonic_clock = self.get_lit_bool('enable_monotonic_clock', True)

View File

@@ -7,6 +7,7 @@ config.python_executable = "@PYTHON_EXECUTABLE@"
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.enable_threads = "@LIBCXX_ENABLE_THREADS@"
config.enable_monotonic_clock = "@LIBCXX_ENABLE_MONOTONIC_CLOCK@"
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"