diff options
| author | Arthur LAURENT <[email protected]> | 2026-02-25 16:22:44 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2026-02-25 16:22:44 +0100 |
| commit | 6881f6b03676fd841f787dc40b48eebce56ed655 (patch) | |
| tree | 85a9d1a1c50472f066a07c8912512559480a4e3f /xmake/rules/c++/modules | |
| parent | 27f49cd4de23014a3e3d9f17740517ab8771f24f (diff) | |
(modules) strip embed-dir on clang / gcc
Diffstat (limited to 'xmake/rules/c++/modules')
| -rw-r--r-- | xmake/rules/c++/modules/clang/support.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/gcc/support.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/support.lua | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/clang/support.lua b/xmake/rules/c++/modules/clang/support.lua index 9447d9c97..4bf5832a6 100644 --- a/xmake/rules/c++/modules/clang/support.lua +++ b/xmake/rules/c++/modules/clang/support.lua @@ -131,7 +131,8 @@ function strippeable_flags() "Q", "fmodule-file", "fPIC", - "fsanitize" + "fsanitize", + "embed-dir" } local splitted_strippeable_flags = { "I", diff --git a/xmake/rules/c++/modules/gcc/support.lua b/xmake/rules/c++/modules/gcc/support.lua index 623444ce4..4de7d6eab 100644 --- a/xmake/rules/c++/modules/gcc/support.lua +++ b/xmake/rules/c++/modules/gcc/support.lua @@ -91,7 +91,8 @@ function strippeable_flags() "fmodules-ts", "fmodules", "fPIC", - "fsanitize" + "fsanitize", + "embed-dir" } local splitted_strippeable_flags = { "I", 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 |
