[libcxx-commits] [libcxx] 7d4546e - [libc++] Split features for platform detection into its own function
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 17 11:46:47 PDT 2020
Author: Louis Dionne
Date: 2020-04-17T14:46:36-04:00
New Revision: 7d4546e3cf410cc5f9295ed57a8462ccbb5aa2a6
URL: https://github.com/llvm/llvm-project/commit/7d4546e3cf410cc5f9295ed57a8462ccbb5aa2a6
DIFF: https://github.com/llvm/llvm-project/commit/7d4546e3cf410cc5f9295ed57a8462ccbb5aa2a6.diff
LOG: [libc++] Split features for platform detection into its own function
This will allow refactoring how the locales are figured out more easily.
Added:
Modified:
libcxx/utils/libcxx/test/config.py
libcxx/utils/libcxx/test/target_info.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 92833ceca567..c31a47fb4f5d 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -355,8 +355,6 @@ def configure_features(self):
self.config.available_features.add(f.strip())
self.target_info.add_locale_features(self.config.available_features)
- target_platform = self.target_info.platform()
-
# Write an "available feature" that combines the triple when
# use_system_cxx_lib is enabled. This is so that we can easily write
# XFAIL markers for tests that are known to fail with versions of
@@ -379,8 +377,8 @@ def configure_features(self):
self.config.available_features.add('availability=%s' % name)
self.config.available_features.add('availability=%s%s' % (name, version))
- # Insert the platform name into the available features as a lower case.
- self.config.available_features.add(target_platform)
+ # Insert the platform name and version into the available features.
+ self.target_info.add_platform_features(self.config.available_features)
# Simulator testing can take a really long time for some of these tests
# so add a feature check so we can REQUIRES: long_tests in them
diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py
index 00af3b8a56e5..caa161ec93be 100644
--- a/libcxx/utils/libcxx/test/target_info.py
+++ b/libcxx/utils/libcxx/test/target_info.py
@@ -40,6 +40,9 @@ def configure_env(self, env): pass
def allow_cxxabi_link(self): return True
def use_lit_shell_default(self): return False
+ def add_platform_features(self, features):
+ features.add(self.platform())
+
def add_path(self, dest_env, new_path):
if not new_path:
return
@@ -229,6 +232,10 @@ def platform_ver(self):
def add_locale_features(self, features):
self.add_common_locales(features)
+
+ def add_platform_features(self, features):
+ super(LinuxLocalTI, self).add_platform_features(features)
+
# Some linux distributions have
diff erent locale data than others.
# Insert the distributions name and name-version into the available
# features to allow tests to XFAIL on them.
More information about the libcxx-commits
mailing list