[libcxx-commits] [libcxx] 17a53a1 - [libc++] Allow <__config_site> not being included
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 5 06:45:39 PDT 2020
Author: Louis Dionne
Date: 2020-05-05T09:45:30-04:00
New Revision: 17a53a14fc14a9e0992aff625d026d2b4bcf9c06
URL: https://github.com/llvm/llvm-project/commit/17a53a14fc14a9e0992aff625d026d2b4bcf9c06
DIFF: https://github.com/llvm/llvm-project/commit/17a53a14fc14a9e0992aff625d026d2b4bcf9c06.diff
LOG: [libc++] Allow <__config_site> not being included
Otherwise, we can't test other standard libraries.
Added:
Modified:
libcxx/utils/libcxx/test/features.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index a48bae81b2d3..ab6dd8f64a54 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -13,13 +13,6 @@
_isAppleClang = lambda cfg: '__apple_build_version__' in compilerMacros(cfg)
_isGCC = lambda cfg: '__GNUC__' in compilerMacros(cfg) and '__clang__' not in compilerMacros(cfg)
-def _assert(condition, message):
- """Function to use an assertion statement as an expression.
- Use as `_assert(condition, message) and <expression>`.
- """
- assert condition, message
- return True
-
features = [
Feature(name='fcoroutines-ts', compileFlag='-fcoroutines-ts',
when=lambda cfg: hasCompileFlag(cfg, '-fcoroutines-ts') and
@@ -81,16 +74,12 @@ def _assert(condition, message):
Feature(name=lambda cfg, macro=macro: macro.lower()[1:].replace('_', '-') + (
'={}'.format(compilerMacros(cfg)[macro]) if compilerMacros(cfg)[macro] else ''
),
- when=lambda cfg, macro=macro:
- _assert('_LIBCPP_CONFIG_SITE' in compilerMacros(cfg),
- "Trying to determine whether macro {} is defined, but it looks "
- "like <__config_site> wasn't included".format(macro)) and
- macro in compilerMacros(cfg),
+ when=lambda cfg, macro=macro: macro 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.
- compileFlag=lambda cfg: '-Wno-macro-redefined -D{}'.format(macro) + (
+ compileFlag=lambda cfg, macro=macro: '-Wno-macro-redefined -D{}'.format(macro) + (
'={}'.format(compilerMacros(cfg)[macro]) if compilerMacros(cfg)[macro] else ''
)
)
More information about the libcxx-commits
mailing list