diff options
| author | ruki <[email protected]> | 2024-03-07 10:02:26 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-07 10:02:26 +0800 |
| commit | de4416c5acd4e3a51fd84ed102a575ac7e34100b (patch) | |
| tree | 73da74046674b9553016d2ebd8b814ea6e41b9b2 | |
| parent | 1f4cc42199c464ba06fa91b5beac0be14d72312f (diff) | |
| parent | 5bca82e0eb88c7c35142cc6adb7d3fbc0d86ad06 (diff) | |
Merge pull request #4803 from Arthapz/fix-stdmodule-clang-default-runtimes
fix C++ library detection when no runtimes is passed
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/compiler_support.lua | 9 |
1 files changed, 8 insertions, 1 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..4d6e6580a 100644 --- a/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua +++ b/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua @@ -67,7 +67,14 @@ function _get_cpplibrary_name(target) return "c++" elseif 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: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 |
