summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/test_base.lua
diff options
context:
space:
mode:
authorryblust <[email protected]>2026-08-31 10:09:19 +0800
committerryblust <[email protected]>2026-08-31 11:45:48 +0800
commitd160d27a164abb54b0b002851918ee2932748066 (patch)
treeb17858f42780afc7015512bca662634828d0ec0b /tests/projects/c++/modules/test_base.lua
parent8ff832c9fba6007ee8bd28cf5e46dddaceca5417 (diff)
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.
Diffstat (limited to 'tests/projects/c++/modules/test_base.lua')
-rw-r--r--tests/projects/c++/modules/test_base.lua5
1 files changed, 4 insertions, 1 deletions
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