diff options
| author | ruki <[email protected]> | 2025-09-26 00:49:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-26 00:49:52 +0800 |
| commit | 4321dfa63bb08dc761ab6810e758a8274cc46162 (patch) | |
| tree | 48390822fb1bb314fe325c743c2f0fea09722d5c | |
| parent | 177fc33ef050f5a9c443c3b07b04ba23c4be5e90 (diff) | |
improve to check cxxflags
| -rw-r--r-- | xmake/modules/private/utils/target.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/target.lua b/xmake/modules/private/utils/target.lua index ec64e05b1..84c307788 100644 --- a/xmake/modules/private/utils/target.lua +++ b/xmake/modules/private/utils/target.lua @@ -37,7 +37,14 @@ function flag_belong_to_tool(flag, toolinst, extraconf) for_this_tool = false local splitinfo = flag:split("::", {plain = true}) local toolname = splitinfo[1] - if toolname == toolinst:name() then + local realname = toolinst:name() + -- We need compatibility with gcc/g++, clang/clang++ for c++ compiler/linker + -- @see https://github.com/xmake-io/xmake/issues/6852 + if realname == "clangxx" or realname == "gxx" then + toolname = toolname:rtrim("xx") + realname = realname:rtrim("xx") + end + if toolname == realname then flag = splitinfo[2] for_this_tool = true end |
