From d160d27a164abb54b0b002851918ee2932748066 Mon Sep 17 00:00:00 2001 From: ryblust Date: Mon, 31 Aug 2026 10:09:19 +0800 Subject: support clang reduced BMI compilation Add an opt-in Clang 23 policy that generates reduced BMIs and compiles module objects directly from source so both jobs can run in parallel. Add module coverage and update the stdmodules_deps fixture for Clang's P1857R3 enforcement. --- tests/projects/c++/modules/test_base.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/projects/c++/modules/test_base.lua') diff --git a/tests/projects/c++/modules/test_base.lua b/tests/projects/c++/modules/test_base.lua index 372229695..ecb468197 100644 --- a/tests/projects/c++/modules/test_base.lua +++ b/tests/projects/c++/modules/test_base.lua @@ -103,6 +103,9 @@ function build_tests(toolchain_name, opt) local policies = "--policies=build.c++.modules.std:" .. (opt.stdmodule and "y" or "n") policies = policies .. ",build.c++.modules.fallbackscanner:" .. (opt.fallbackscanner and "y" or "n") policies = policies .. ",build.c++.modules.two_phases:" .. (two_phases and "y" or "n") + if opt.precompile_reduced_bmi ~= nil then + policies = policies .. ",build.c++.modules.clang.precompile_reduced_bmi:" .. (opt.precompile_reduced_bmi and "y" or "n") + end local platform = " " if opt.platform then @@ -127,7 +130,7 @@ function build_tests(toolchain_name, opt) os.exec("xmake clean -a") os.exec("xmake f" .. platform .. "--toolchain=" .. toolchain_name .. runtimes .. "-c --yes " .. policies .. flags) if opt.build then - opt.build() + opt.build(table.join(opt, {toolchain = toolchain_name, two_phases = two_phases})) else _build(opt.check_outdata) end -- cgit v1.3.1