mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
[libc++] Properly detect whether C++20 modules are supported by the compiler (#94275)
It is possible for a compiler to support the warning without being able to compile `export module foo;`, so use that in addition to the warning to check whether C++20 modules are supported.
This commit is contained in:
@@ -317,7 +317,14 @@ DEFAULT_FEATURES = [
|
||||
or ("_WIN32" in compilerMacros(cfg) and not _mingwSupportsModules(cfg))
|
||||
or platform.system().lower().startswith("aix")
|
||||
# Avoid building on platforms that don't support modules properly.
|
||||
or not hasCompileFlag(cfg, "-Wno-reserved-module-identifier"),
|
||||
or not hasCompileFlag(cfg, "-Wno-reserved-module-identifier")
|
||||
or not sourceBuilds(
|
||||
cfg,
|
||||
"""
|
||||
export module test;
|
||||
int main(int, char**) { return 0; }
|
||||
""",
|
||||
),
|
||||
),
|
||||
# The time zone validation tests compare the output of zdump against the
|
||||
# output generated by <chrono>'s time zone support.
|
||||
|
||||
Reference in New Issue
Block a user