summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-05-08 21:29:03 +0800
committerstar9029 <[email protected]>2025-05-08 21:29:03 +0800
commit78394e6f3e065c6f1f27cb672fd11f25b1f6e6fc (patch)
tree94704bbe6238e5d30a49c50a1f1d6484eaf41a8f
parent7301a531f1581e5b22897c13c66d2704c493dbd9 (diff)
Add dlltool toolset for mingw
-rw-r--r--xmake/modules/package/tools/meson.lua4
-rw-r--r--xmake/toolchains/mingw/xmake.lua2
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 3a26d355c..d03745b41 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -261,6 +261,10 @@ function _get_configs_file(package, opt)
if mrc then
file:print("windres=['%s']", executable_path(mrc))
end
+ local dlltool = package:build_getenv("dlltool")
+ if dlltool then
+ file:print("dlltool=['%s']", executable_path(dlltool))
+ end
end
local cmake = find_tool("cmake")
if cmake then
diff --git a/xmake/toolchains/mingw/xmake.lua b/xmake/toolchains/mingw/xmake.lua
index 03b149bd4..a88637780 100644
--- a/xmake/toolchains/mingw/xmake.lua
+++ b/xmake/toolchains/mingw/xmake.lua
@@ -67,6 +67,7 @@ toolchain("mingw")
toolchain:add("toolset", "ranlib", cross .. "ranlib")
toolchain:add("toolset", "objcopy", cross .. "objcopy")
toolchain:add("toolset", "mrc", cross .. "windres")
+ toolchain:add("toolset", "dlltool", cross .. "dlltool")
if is_host("windows") and bindir then
-- we use bin/gcc.exe if cross not found
-- @see https://github.com/xmake-io/xmake/issues/977#issuecomment-704863677
@@ -77,6 +78,7 @@ toolchain("mingw")
toolchain:add("toolset", "ld", path.join(bindir, "g++"), path.join(bindir, "gcc"))
toolchain:add("toolset", "sh", path.join(bindir, "g++"), path.join(bindir, "gcc"))
toolchain:add("toolset", "mrc", path.join(bindir, "windres"))
+ toolchain:add("toolset", "dlltool", path.join(bindir, "dlltool"))
end
-- init flags for architecture