Skip to content

Commit

Permalink
use package:runtimes instead of package:config("runtimes")
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthapz committed Apr 10, 2024
1 parent 5a29f4c commit 546dd2e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xmake/modules/package/tools/autoconf.lua
Expand Up @@ -304,7 +304,7 @@ function buildenvs(package, opt)
table.join2(cxxflags, package:_generate_lto_configs("cxx").cxxflags)
table.join2(ldflags, package:_generate_lto_configs().ldflags)
end
local runtimes = package:config("runtimes")
local runtimes = package:runtimes()
if runtimes then
local fake_target = {is_shared = function(_) return false end,
sourcekinds = function(_) return "cxx" end}
Expand Down
3 changes: 1 addition & 2 deletions xmake/modules/package/tools/cmake.lua
Expand Up @@ -184,8 +184,7 @@ function _get_cxxflags(package, opt)
table.join2(result, _map_compflags(package, "cxx", "includedir", package:build_getenv("includedirs")))
table.join2(result, _map_compflags(package, "cxx", "sysincludedir", package:build_getenv("sysincludedirs")))
end
table.join2(result, _map_compflags(package, "cxx", "runtime", package:config("runtimes")))
local runtimes = package:config("runtimes")
local runtimes = package:runtimes()
if runtimes then
local fake_target = {is_shared = function(_) return false end,
sourcekinds = function(_) return "cxx" end}
Expand Down
3 changes: 1 addition & 2 deletions xmake/modules/package/tools/make.lua
Expand Up @@ -49,8 +49,7 @@ function buildenvs(package)
local asflags = table.copy(table.wrap(package:config("asflags")))
local ldflags = table.copy(table.wrap(package:config("ldflags")))
local shflags = table.copy(table.wrap(package:config("shflags")))
local runtimes = package:config("runtimes")
local runtimes = package:config("runtimes")
local runtimes = package:runtimes()
if runtimes then
local fake_target = {is_shared = function(_) return false end,
sourcekinds = function(_) return "cxx" end}
Expand Down
2 changes: 1 addition & 1 deletion xmake/modules/package/tools/meson.lua
Expand Up @@ -269,7 +269,7 @@ function _get_configs_file(package, opt)
table.join2(ldflags, _get_ldflags_from_packagedeps(package, opt))
table.join2(shflags, _get_ldflags_from_packagedeps(package, opt))
-- add runtimes flags
for _, runtime in ipairs(package:config("runtimes")) do
for _, runtime in ipairs(package:runtimes()) do
if not runtime:startswith("M") then
local fake_target = {is_shared = function(_) return false end,
sourcekinds = function(_) return "cxx" end}
Expand Down

0 comments on commit 546dd2e

Please sign in to comment.