diff options
| author | ruki <[email protected]> | 2026-08-24 23:02:06 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-08-24 23:02:06 +0800 |
| commit | 37047133c25656d03d8654028bef5a3b445b2b17 (patch) | |
| tree | d5458e39fe04eb00333cdd950eacfe03355176cd /xmake/rules/c++ | |
| parent | d38052166362f81792c1df01538a85dfc36a46ff (diff) | |
| parent | 58983968519544cef4b4cebc08054c3843ba5a55 (diff) | |
Merge pull request #7726 from damster101/patch1
Improve MinGW toolchain support for Clang and libc++
Diffstat (limited to 'xmake/rules/c++')
| -rw-r--r-- | xmake/rules/c++/modules/support.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/support.lua b/xmake/rules/c++/modules/support.lua index 126e25c61..38df28a05 100644 --- a/xmake/rules/c++/modules/support.lua +++ b/xmake/rules/c++/modules/support.lua @@ -92,7 +92,15 @@ function get_cpplibrary_name(target) end elseif target:is_plat("macosx", "iphoneos", "watchos", "appletvos", "applexros", "bsd", "harmony") then return "c++" - elseif target:is_plat("linux", "mingw", "cygwin", "msys", "haiku") then + elseif target:is_plat("linux", "cygwin", "msys", "haiku") then + return "stdc++" + elseif target:is_plat("mingw") then + local toolchain_inst = target:toolchain("mingw") + local is_clang = (toolchain_inst and toolchain_inst:config("clang")) or + target:has_tool("cxx", "clang", "clangxx", "clang_cl") + if is_clang then + return "c++" + end return "stdc++" elseif target:is_plat("windows") then return "msstl" |
