summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2024-04-03 04:49:45 +0200
committerArthur LAURENT <[email protected]>2024-04-03 05:26:12 +0200
commit3319219a1a2fc26520f0e1760d953e9c0352a91b (patch)
treed880f343790fbe11fb9864e64cb039e817f70760 /xmake/modules/core
parent13b1dda53dfe34b24982f1f3c436a860fd257aa1 (diff)
apply runtime to package targets (for check_cxxsnippet support)
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/clang.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua
index 76f553829..76a1f773b 100644
--- a/xmake/modules/core/tools/clang.lua
+++ b/xmake/modules/core/tools/clang.lua
@@ -268,8 +268,9 @@ function nf_runtime(self, runtime, opt)
maps["c++_shared"] = table.join(maps["c++_shared"], "-cxx-isystem" .. path.join(llvm_rootdir, "include", "c++", "v1"))
end
elseif kind == "ld" or kind == "sh" then
- local target = opt.target
- if target and target.sourcekinds and table.contains(table.wrap(target:sourcekinds()), "cxx") then
+ local target = opt.target or opt
+ local is_cxx = target and (target.sourcekinds and table.contains(table.wrap(target:sourcekinds()), "cxx"))
+ if is_cxx then
maps["c++_static"] = "-stdlib=libc++"
maps["c++_shared"] = "-stdlib=libc++"
maps["stdc++_static"] = "-stdlib=libstdc++"