diff options
| author | Arthur LAURENT <[email protected]> | 2024-03-06 20:06:32 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-03-06 20:06:32 +0100 |
| commit | 6f781bacba2a63ab1172a00079c0ab65b829145c (patch) | |
| tree | 04f021f59de8a2345a9409ab2e6e1fa50c3305e1 | |
| parent | 1f4cc42199c464ba06fa91b5beac0be14d72312f (diff) | |
fix C++ library detection when no runtimes is passed
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/compiler_support.lua | 6 |
1 files changed, 3 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 49e01db90..5ee8dc591 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,11 @@ 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:has_runtime("c++_shared", "c++_static") then + if target:is_plat("macosx") and target:runtimes() == nil or target:has_runtime("c++_shared", "c++_static") then return "c++" - elseif target:has_runtime("stdc++_shared", "stdc++_static") then + elseif target:is_plat("linux") and target:runtimes() == nil or target:has_runtime("stdc++_shared", "stdc++_static") then return "stdc++" - elseif target:is_plat("windows") and target:has_runtime("MD", "MT", "MDd", "MTd") then + elseif target:is_plat("windows") and target:runtimes() == nil or target:has_runtime("MD", "MT", "MDd", "MTd") then return "msstl" end end |
