From 0f3fd89593450c21b2fb75e89950f47f9a85202e Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Mon, 25 Aug 2025 12:48:58 +0200 Subject: feat(C++ modules support) use a file for requires files when --verbose or --diagnosis is supplied --- xmake/rules/c++/modules/support.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xmake/rules/c++/modules/support.lua') diff --git a/xmake/rules/c++/modules/support.lua b/xmake/rules/c++/modules/support.lua index 29fc92fb0..ef1d1f9dd 100644 --- a/xmake/rules/c++/modules/support.lua +++ b/xmake/rules/c++/modules/support.lua @@ -76,10 +76,14 @@ end -- strip flags not relevent for module reuse function strip_flags(target, flags, opt) - local strippeable_flags, splitted_strippeable_flags = _support(target).strippeable_flags() - - if opt and opt.strip_defines then - table.join2(splitted_strippeable_flags, {"D", "U"}) + local strippeable_flags, splitted_strippeable_flags + if not opt.requiresonly then + strippeable_flags, splitted_strippeable_flags = _support(target).strippeable_flags() + if opt and opt.strip_defines then + table.join2(splitted_strippeable_flags, {"D", "U"}) + end + else + strippeable_flags, splitted_strippeable_flags = _support(target).require_flags() end local splitted_strippeable_flags_set = hashset.new() -- cgit v1.3.1