summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/support.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2026-02-25 16:22:44 +0100
committerArthur LAURENT <[email protected]>2026-02-25 16:22:44 +0100
commit6881f6b03676fd841f787dc40b48eebce56ed655 (patch)
tree85a9d1a1c50472f066a07c8912512559480a4e3f /xmake/rules/c++/modules/support.lua
parent27f49cd4de23014a3e3d9f17740517ab8771f24f (diff)
(modules) strip embed-dir on clang / gcc
Diffstat (limited to 'xmake/rules/c++/modules/support.lua')
-rw-r--r--xmake/rules/c++/modules/support.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/support.lua b/xmake/rules/c++/modules/support.lua
index 1f23ae52a..0767c88af 100644
--- a/xmake/rules/c++/modules/support.lua
+++ b/xmake/rules/c++/modules/support.lua
@@ -120,6 +120,7 @@ function strip_flags(target, flags, opt)
for _, flag in ipairs(splitted_strippeable_flags) do
table.insert(strippeable_flags, flag)
splitted_strippeable_flags_set:insert("/" .. flag)
+ splitted_strippeable_flags_set:insert("--" .. flag)
splitted_strippeable_flags_set:insert("-" .. flag)
end
@@ -133,11 +134,11 @@ function strip_flags(target, flags, opt)
strip_next_flag = false
else
for _, _flag in ipairs(strippeable_flags) do
- if (flag == "/" .. _flag) or (flag == "-" .. _flag) then
+ if (flag == "/" .. _flag) or (flag == "--" .. _flag) or (flag == "-" .. _flag) then
strip = true
strip_next_flag = splitted_strippeable_flags_set:has(flag)
break
- elseif flag:startswith("/" .. _flag) or flag:startswith("-" .. _flag) then
+ elseif flag:startswith("/" .. _flag) or flag:startswith("--" .. _flag) or flag:startswith("-" .. _flag) then
strip = true
break
end