Skip to content

Commit de4416c

Browse files
authored
Merge pull request #4803 from Arthapz/fix-stdmodule-clang-default-runtimes
fix C++ library detection when no runtimes is passed
2 parents 1f4cc42 + 5bca82e commit de4416c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xmake/rules/c++/modules/modules_support/clang/compiler_support.lua

+8-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ function _get_cpplibrary_name(target)
6767
return "c++"
6868
elseif target:has_runtime("stdc++_shared", "stdc++_static") then
6969
return "stdc++"
70-
elseif target:is_plat("windows") and target:has_runtime("MD", "MT", "MDd", "MTd") then
70+
elseif target:has_runtime("MD", "MT", "MDd", "MTd") then
71+
return "msstl"
72+
end
73+
if target:is_plat("macosx") then
74+
return "c++"
75+
elseif target:is_plat("linux") then
76+
return "stdc++"
77+
elseif target:is_plat("windows") then
7178
return "msstl"
7279
end
7380
end

0 commit comments

Comments
 (0)