summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/support.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-08-25 12:48:58 +0200
committerArthur LAURENT <[email protected]>2025-08-25 12:48:58 +0200
commit0f3fd89593450c21b2fb75e89950f47f9a85202e (patch)
treeb1c3081753ea4e814a45812c24a284b34a04b30e /xmake/rules/c++/modules/support.lua
parent57a0f0e067544e6d4767a4fa37102ce949d465e3 (diff)
feat(C++ modules support) use a file for requires files when --verbose or --diagnosis is supplied
Diffstat (limited to 'xmake/rules/c++/modules/support.lua')
-rw-r--r--xmake/rules/c++/modules/support.lua12
1 files changed, 8 insertions, 4 deletions
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()