[libcxx-commits] [PATCH] D119036: [libc++] Fix modules and benchmarks CI builds when incomplete features are disabled
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 4 13:51:05 PST 2022
ldionne created this revision.
Herald added subscribers: arichardson, mgorny.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119036
Files:
libcxx/benchmarks/CMakeLists.txt
libcxx/include/module.modulemap
libcxx/utils/libcxx/test/features.py
Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -129,22 +129,10 @@
'_LIBCPP_HAS_NO_UNICODE': 'libcpp-has-no-unicode',
}
for macro, feature in macros.items():
- DEFAULT_FEATURES += [
- Feature(name=lambda cfg, m=macro, f=feature: f + (
- '={}'.format(compilerMacros(cfg)[m]) if compilerMacros(cfg)[m] else ''
- ),
- when=lambda cfg, m=macro: m in compilerMacros(cfg),
-
- # FIXME: This is a hack that should be fixed using module maps.
- # If modules are enabled then we have to lift all of the definitions
- # in <__config_site> onto the command line.
- actions=lambda cfg, m=macro: [
- AddCompileFlag('-Wno-macro-redefined -D{}'.format(m) + (
- '={}'.format(compilerMacros(cfg)[m]) if compilerMacros(cfg)[m] else ''
- ))
- ]
- )
- ]
+ DEFAULT_FEATURES.append(
+ Feature(name=lambda cfg, m=macro, f=feature: f + ('={}'.format(compilerMacros(cfg)[m]) if compilerMacros(cfg)[m] else ''),
+ when=lambda cfg, m=macro: m in compilerMacros(cfg))
+ )
# Mapping from canonical locale names (used in the tests) to possible locale
Index: libcxx/include/module.modulemap
===================================================================
--- libcxx/include/module.modulemap
+++ libcxx/include/module.modulemap
@@ -2,7 +2,8 @@
// since __config may be included from C headers which may create an
// include cycle.
module std_config [system] [extern_c] {
- header "__config"
+ textual header "__config"
+ textual header "__config_site"
}
module std [system] {
Index: libcxx/benchmarks/CMakeLists.txt
===================================================================
--- libcxx/benchmarks/CMakeLists.txt
+++ libcxx/benchmarks/CMakeLists.txt
@@ -166,6 +166,11 @@
# Register Benchmark tests
#==============================================================================
file(GLOB BENCHMARK_TESTS "*.bench.cpp")
+
+if (NOT LIBCXX_ENABLE_INCOMPLETE_FEATURES)
+ list(FILTER BENCHMARK_TESTS EXCLUDE REGEX "(format_to_n|format_to|format|formatted_size|formatter_float|std_format_spec_string_unicode).bench.cpp")
+endif()
+
foreach(test_path ${BENCHMARK_TESTS})
get_filename_component(test_file "${test_path}" NAME)
string(REPLACE ".bench.cpp" "" test_name "${test_file}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119036.406098.patch
Type: text/x-patch
Size: 2492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220204/9110c9a1/attachment-0001.bin>
More information about the libcxx-commits
mailing list