mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-03 14:22:23 +00:00
[libc++] NFC: Remove unused Lit features in the test suite
The libc++ test suite currently defines several features that are not used anywhere in the tests, or that are redundant with other features. For the purpose of simplifying config.py and to ease the bring up of a new configuration, this commit removes some of these features: - rename dylib-has-no-filesystem to c++filesystem-disabled, which exists - rename apple-darwin to just darwin, which is already set - remove useless setting of libstdc++, which is already set correctly - remove libcpp-abi-unstable, which is not used anywhere - remove the glibc-XXX features, which are not used anywhere
This commit is contained in:
parent
f1542efd97
commit
9d8c22587b
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: suse-linux-enterprise-server-11
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
// XFAIL: newlib
|
||||
// XFAIL: netbsd
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <fstream>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <fstream>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <fstream>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
// FILE_DEPENDENCIES: test.dat
|
||||
|
||||
// <fstream>
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
// FILE_DEPENDENCIES: test.dat
|
||||
|
||||
// <fstream>
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <fstream>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <fstream>
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Disable all of the filesystem tests if the dylib under test doesn't support them.
|
||||
if 'dylib-has-no-filesystem' in config.available_features:
|
||||
config.unsupported = True
|
||||
if 'c++filesystem-disabled' in config.available_features:
|
||||
config.unsupported = True
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This test is passing in an uncontrolled manner in some Apple environment.
|
||||
// UNSUPPORTED: apple-darwin
|
||||
// UNSUPPORTED: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This test is passing in an uncontrolled manner in some Apple environment.
|
||||
// UNSUPPORTED: apple-darwin
|
||||
// UNSUPPORTED: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
// XFAIL: darwin
|
||||
//
|
||||
// NetBSD does not support LC_MONETARY at the moment
|
||||
// XFAIL: netbsd
|
||||
|
@ -7,7 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
|
||||
// XFAIL: dylib-has-no-filesystem
|
||||
// UNSUPPORTED: c++filesystem-disabled
|
||||
|
||||
// <chrono>
|
||||
|
||||
|
@ -333,7 +333,6 @@ class Configuration(object):
|
||||
% self.cxx_stdlib_under_test)
|
||||
self.config.available_features.add(self.cxx_stdlib_under_test)
|
||||
if self.cxx_stdlib_under_test == 'libstdc++':
|
||||
self.config.available_features.add('libstdc++')
|
||||
# Manually enable the experimental and filesystem tests for libstdc++
|
||||
# if the options aren't present.
|
||||
# FIXME this is a hack.
|
||||
@ -424,9 +423,6 @@ class Configuration(object):
|
||||
self.config.available_features.add('availability')
|
||||
self.add_deployment_feature('availability')
|
||||
|
||||
if self.target_info.is_darwin():
|
||||
self.config.available_features.add('apple-darwin')
|
||||
|
||||
# Insert the platform name into the available features as a lower case.
|
||||
self.config.available_features.add(target_platform)
|
||||
|
||||
@ -444,7 +440,6 @@ class Configuration(object):
|
||||
|
||||
if not self.get_lit_bool('enable_filesystem', default=True):
|
||||
self.config.available_features.add('c++filesystem-disabled')
|
||||
self.config.available_features.add('dylib-has-no-filesystem')
|
||||
|
||||
|
||||
# Run a compile test for the -fsized-deallocation flag. This is needed
|
||||
@ -486,15 +481,6 @@ class Configuration(object):
|
||||
# using this feature. (Also see llvm.org/PR32730)
|
||||
self.config.available_features.add('LIBCXX-WINDOWS-FIXME')
|
||||
|
||||
# Attempt to detect the glibc version by querying for __GLIBC__
|
||||
# in 'features.h'.
|
||||
macros = self.cxx.dumpMacros(flags=['-include', 'features.h'])
|
||||
if isinstance(macros, dict) and '__GLIBC__' in macros:
|
||||
maj_v, min_v = (macros['__GLIBC__'], macros['__GLIBC_MINOR__'])
|
||||
self.config.available_features.add('glibc')
|
||||
self.config.available_features.add('glibc-%s' % maj_v)
|
||||
self.config.available_features.add('glibc-%s.%s' % (maj_v, min_v))
|
||||
|
||||
libcxx_gdb = self.get_lit_conf('libcxx_gdb')
|
||||
if libcxx_gdb and 'NOTFOUND' not in libcxx_gdb:
|
||||
self.config.available_features.add('libcxx_gdb')
|
||||
@ -727,7 +713,6 @@ class Configuration(object):
|
||||
if abi_version and abi_version != '1':
|
||||
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_link_flags(self):
|
||||
@ -1164,12 +1149,12 @@ class Configuration(object):
|
||||
# which is not relevant for non-shipped flavors of libc++.
|
||||
if self.use_system_cxx_lib:
|
||||
# Dylib support for shared_mutex was added in macosx10.12.
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(7, 12)):
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(9, 12)):
|
||||
self.config.available_features.add('dylib-has-no-shared_mutex')
|
||||
self.lit_config.note("shared_mutex is not supported by the deployment target")
|
||||
# Throwing bad_optional_access, bad_variant_access and bad_any_cast is
|
||||
# supported starting in macosx10.14.
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(7, 14)):
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(9, 14)):
|
||||
self.config.available_features.add('dylib-has-no-bad_optional_access')
|
||||
self.lit_config.note("throwing bad_optional_access is not supported by the deployment target")
|
||||
|
||||
@ -1179,8 +1164,8 @@ class Configuration(object):
|
||||
self.config.available_features.add('dylib-has-no-bad_any_cast')
|
||||
self.lit_config.note("throwing bad_any_cast is not supported by the deployment target")
|
||||
# Filesystem is support on Apple platforms starting with macosx10.15.
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(7, 15)):
|
||||
self.config.available_features.add('dylib-has-no-filesystem')
|
||||
if name == 'macosx' and version in ('10.%s' % v for v in range(9, 15)):
|
||||
self.config.available_features.add('c++filesystem-disabled')
|
||||
self.lit_config.note("the deployment target does not support <filesystem>")
|
||||
else:
|
||||
self.cxx.compile_flags += ['-D_LIBCPP_DISABLE_AVAILABILITY']
|
||||
|
Loading…
Reference in New Issue
Block a user