Skip to content

Commit f8f9407

Browse files
authored
Merge pull request #6408 from star-hengxing/dlltool
Add dlltool toolset for mingw
2 parents 7301a53 + 78394e6 commit f8f9407

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

xmake/modules/package/tools/meson.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ function _get_configs_file(package, opt)
261261
if mrc then
262262
file:print("windres=['%s']", executable_path(mrc))
263263
end
264+
local dlltool = package:build_getenv("dlltool")
265+
if dlltool then
266+
file:print("dlltool=['%s']", executable_path(dlltool))
267+
end
264268
end
265269
local cmake = find_tool("cmake")
266270
if cmake then

xmake/toolchains/mingw/xmake.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ toolchain("mingw")
6767
toolchain:add("toolset", "ranlib", cross .. "ranlib")
6868
toolchain:add("toolset", "objcopy", cross .. "objcopy")
6969
toolchain:add("toolset", "mrc", cross .. "windres")
70+
toolchain:add("toolset", "dlltool", cross .. "dlltool")
7071
if is_host("windows") and bindir then
7172
-- we use bin/gcc.exe if cross not found
7273
-- @see https://github.com/xmake-io/xmake/issues/977#issuecomment-704863677
@@ -77,6 +78,7 @@ toolchain("mingw")
7778
toolchain:add("toolset", "ld", path.join(bindir, "g++"), path.join(bindir, "gcc"))
7879
toolchain:add("toolset", "sh", path.join(bindir, "g++"), path.join(bindir, "gcc"))
7980
toolchain:add("toolset", "mrc", path.join(bindir, "windres"))
81+
toolchain:add("toolset", "dlltool", path.join(bindir, "dlltool"))
8082
end
8183

8284
-- init flags for architecture

0 commit comments

Comments
 (0)