summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2024-04-03 04:56:57 +0200
committerArthur LAURENT <[email protected]>2024-04-10 16:01:26 +0200
commit5a29f4cd631037145d74ad67227c5486c9a08247 (patch)
treeb3e9cacc019ec7da8e56d36cee027c485fa2b583 /xmake/modules/package/tools/autoconf.lua
parentb559b4c1591e448b0f3faaa5928fc79e8286b8c3 (diff)
add support for --runtimes on autoconf, cmake, make and meson
buildsystems
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index f7a847ce0..05e968a23 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -304,6 +304,16 @@ 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")
+ if runtimes then
+ local fake_target = {is_shared = function(_) return false end,
+ sourcekinds = function(_) return "cxx" end}
+ table.join2(cxxflags, _map_compflags(fake_target, "cxx", "runtime", runtimes))
+ table.join2(ldflags, _map_linkflags(fake_target, "binary", {"cxx"}, "runtime", runtimes))
+ fake_target = {is_shared = function(_) return true end,
+ sourcekinds = function(_) return "cxx" end}
+ table.join2(shflags, _map_linkflags(fake_target, "shared", {"cxx"}, "runtime", runtimes))
+ end
if package:config("asan") then
table.join2(cflags, package:_generate_sanitizer_configs("address", "cc").cflags)
table.join2(cxxflags, package:_generate_sanitizer_configs("address", "cxx").cxxflags)