summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-23 22:55:55 +0800
committerruki <[email protected]>2024-01-25 12:09:58 +0800
commit229bccd5eeca9fb6da8b93c76d0d13f9c2b85314 (patch)
tree0f0020912c9a12b958e986c8832cae099bf45f54 /xmake/core/package/package.lua
parent2fb724f49f1ededb23998688c90ba01ec0d12467 (diff)
remove more vs_runtime
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 992650005..69d2b234d 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2260,21 +2260,21 @@ function _instance:_generate_build_configs(configs, opt)
configs = table.join(self:fetch_librarydeps(), configs)
if self:is_plat("windows") then
local ld = self:build_getenv("ld")
- local vs_runtime = self:config("vs_runtime")
- -- since we are ignoring the vs_runtime of the headeronly library,
- -- we can only get the vs_runtime from the dependency library to detect the link.
- if self:is_headeronly() and not vs_runtime and self:librarydeps() then
+ local runtimes = self:runtimes()
+ -- since we are ignoring the runtimes of the headeronly library,
+ -- we can only get the runtimes from the dependency library to detect the link.
+ if self:is_headeronly() and not runtimes and self:librarydeps() then
for _, dep in ipairs(self:librarydeps()) do
- if dep:is_plat("windows") and dep:config("vs_runtime") then
- vs_runtime = dep:config("vs_runtime")
+ if dep:is_plat("windows") and dep:runtimes() then
+ runtimes = dep:runtimes()
break
end
end
end
- if vs_runtime and ld and path.basename(ld:lower()) == "link" then -- for msvc?
+ if runtimes and ld and path.basename(ld:lower()) == "link" then -- for msvc?
configs.cxflags = table.wrap(configs.cxflags)
- table.insert(configs.cxflags, "/" .. vs_runtime)
- if vs_runtime:startswith("MT") then
+ table.insert(configs.cxflags, "/" .. runtimes)
+ if runtimes:startswith("MT") then
configs.ldflags = table.wrap(configs.ldflags)
table.insert(configs.ldflags, "-nodefaultlib:msvcrt.lib")
end