diff options
Diffstat (limited to 'xmake/rules/c++/modules/support.lua')
| -rw-r--r-- | xmake/rules/c++/modules/support.lua | 12 |
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() |
