diff options
| author | ruki <[email protected]> | 2024-03-07 09:45:11 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-07 09:45:11 +0800 |
| commit | 5bca82e0eb88c7c35142cc6adb7d3fbc0d86ad06 (patch) | |
| tree | 73da74046674b9553016d2ebd8b814ea6e41b9b2 /xmake/rules/c++/modules/modules_support | |
| parent | 6f781bacba2a63ab1172a00079c0ab65b829145c (diff) | |
Update compiler_support.lua
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/compiler_support.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua b/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua index 5ee8dc591..4d6e6580a 100644 --- a/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua +++ b/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua @@ -63,11 +63,18 @@ end function _get_cpplibrary_name(target) -- libc++ come first because on windows, if we use libc++ clang will still use msvc crt so MD / MT / MDd / MTd can be set - if target:is_plat("macosx") and target:runtimes() == nil or target:has_runtime("c++_shared", "c++_static") then + if target:has_runtime("c++_shared", "c++_static") then return "c++" - elseif target:is_plat("linux") and target:runtimes() == nil or target:has_runtime("stdc++_shared", "stdc++_static") then + elseif target:has_runtime("stdc++_shared", "stdc++_static") then return "stdc++" - elseif target:is_plat("windows") and target:runtimes() == nil or target:has_runtime("MD", "MT", "MDd", "MTd") then + elseif target:has_runtime("MD", "MT", "MDd", "MTd") then + return "msstl" + end + if target:is_plat("macosx") then + return "c++" + elseif target:is_plat("linux") then + return "stdc++" + elseif target:is_plat("windows") then return "msstl" end end |
