Skip to content

Commit fd91a72

Browse files
committed
fix libcxx test
1 parent 880f14b commit fd91a72

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

libcxx/utils/libcxx/test/features.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,20 @@ def _mingwSupportsModules(cfg):
336336
or platform.system().lower().startswith("aix")
337337
# Avoid building on platforms that don't support modules properly.
338338
or not hasCompileFlag(cfg, "-Wno-reserved-module-identifier")
339-
or not sourceBuilds(
339+
# older versions don't support extern "C++", newer versions don't support main in named module.
340+
or not (sourceBuilds(
340341
cfg,
341342
"""
342343
export module test;
343344
extern "C++" int main(int, char**) { return 0; }
344345
""",
345-
),
346+
) or sourceBuilds(
347+
cfg,
348+
"""
349+
export module test;
350+
int main(int, char**) { return 0; }
351+
""",
352+
)),
346353
),
347354
# The time zone validation tests compare the output of zdump against the
348355
# output generated by <chrono>'s time zone support.

0 commit comments

Comments
 (0)