mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 16:11:29 +00:00
[runtimes] Move enable_32bit to the DSL
This is necessary for from-scratch configurations to support the 32-bit mode of the test suite. Differential Revision: https://reviews.llvm.org/D105435
This commit is contained in:
parent
a7512401e5
commit
f7d8754312
@ -113,6 +113,10 @@ if (LLVM_USE_SANITIZER)
|
||||
serialize_lit_param(use_sanitizer "\"${LLVM_USE_SANITIZER}\"")
|
||||
endif()
|
||||
|
||||
if (LIBCXX_BUILD_32_BITS)
|
||||
serialize_lit_param(enable_32bit True)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED LIBCXX_TEST_DEPS)
|
||||
message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined")
|
||||
endif()
|
||||
|
@ -13,7 +13,6 @@ config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
|
||||
config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
|
||||
config.abi_library_root = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
|
||||
config.enable_shared = @LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX@
|
||||
config.enable_32bit = @LIBCXX_BUILD_32_BITS@
|
||||
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
|
||||
config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
|
||||
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
||||
|
@ -267,10 +267,6 @@ class Configuration(object):
|
||||
self.configure_compile_flags_header_includes()
|
||||
self.target_info.add_cxx_compile_flags(self.cxx.compile_flags)
|
||||
self.target_info.add_cxx_flags(self.cxx.flags)
|
||||
# Configure feature flags.
|
||||
enable_32bit = self.get_lit_bool('enable_32bit', False)
|
||||
if enable_32bit:
|
||||
self.cxx.flags += ['-m32']
|
||||
# Use verbose output for better errors
|
||||
self.cxx.flags += ['-v']
|
||||
sysroot = self.get_lit_conf('sysroot')
|
||||
|
@ -158,6 +158,13 @@ DEFAULT_PARAMETERS = [
|
||||
AddFeature('libcxx-no-debug-mode')
|
||||
]),
|
||||
|
||||
Parameter(name='enable_32bit', choices=[True, False], type=bool, default=False,
|
||||
help="Whether to build the test suite in 32 bit mode even on a 64 bit target. This basically controls "
|
||||
"whether -m32 is used when building the test suite.",
|
||||
actions=lambda enabled: [] if not enabled else [
|
||||
AddFlag('-m32')
|
||||
]),
|
||||
|
||||
Parameter(name='additional_features', type=list, default=[],
|
||||
help="A comma-delimited list of additional features that will be enabled when running the tests. "
|
||||
"This should be used sparingly since specifying ad-hoc features manually is error-prone and "
|
||||
|
@ -90,6 +90,10 @@ if (TARGET_TRIPLE)
|
||||
serialize_lit_param(target_triple "\"${TARGET_TRIPLE}\"")
|
||||
endif()
|
||||
|
||||
if (LIBCXXABI_BUILD_32_BITS)
|
||||
serialize_lit_param(enable_32bit True)
|
||||
endif()
|
||||
|
||||
configure_lit_site_cfg(
|
||||
"${LIBCXXABI_TEST_CONFIG}"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
|
@ -18,7 +18,6 @@ config.cxx_library_root = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
|
||||
config.llvm_unwinder = @LIBCXXABI_USE_LLVM_UNWINDER@
|
||||
config.builtins_library = "@LIBCXXABI_BUILTINS_LIBRARY@"
|
||||
config.enable_threads = @LIBCXXABI_ENABLE_THREADS@
|
||||
config.enable_32bit = @LIBCXXABI_BUILD_32_BITS@
|
||||
config.target_info = "@LIBCXXABI_TARGET_INFO@"
|
||||
config.executor = "@LIBCXXABI_EXECUTOR@"
|
||||
config.libcxxabi_shared = @LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI@
|
||||
|
@ -40,6 +40,10 @@ if (TARGET_TRIPLE)
|
||||
serialize_lit_param(target_triple "\"${TARGET_TRIPLE}\"")
|
||||
endif()
|
||||
|
||||
if (LIBUNWIND_BUILD_32_BITS)
|
||||
serialize_lit_param(enable_32bit True)
|
||||
endif()
|
||||
|
||||
configure_lit_site_cfg(
|
||||
"${LIBUNWIND_TEST_CONFIG}"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
|
@ -16,7 +16,6 @@ config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
|
||||
config.llvm_unwinder = True
|
||||
config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@"
|
||||
config.enable_threads = @LIBUNWIND_ENABLE_THREADS@
|
||||
config.enable_32bit = @LIBUNWIND_BUILD_32_BITS@
|
||||
config.target_info = "@LIBUNWIND_TARGET_INFO@"
|
||||
config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
|
||||
config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
|
||||
|
Loading…
Reference in New Issue
Block a user