From a9f3eac5faf29e1a60b68ec2ac7ec791ef7549ee Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 20 Dec 2018 22:45:48 +0800 Subject: fix mingw static link --- xmake/modules/core/tools/gcc.lua | 2 +- xmake/modules/core/tools/nvcc.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/modules') diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e94eb5827..278df4451 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -308,7 +308,7 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags) -- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc if targetkind == "shared" and config.plat() == "mingw" then - table.insert(flags_extra, "-Wl,--out-implib," .. os.args(path.join(path.directory(targetfile), path.basename(targetfile) .. ".a"))) + table.insert(flags_extra, "-Wl,--out-implib," .. os.args(path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib"))) end -- make link args diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index e653629f4..dbbf5476d 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -166,7 +166,7 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags) -- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc if targetkind == "shared" and config.plat() == "mingw" then - table.insert(flags_extra, "-Wl,--out-implib," .. os.args(path.join(path.directory(targetfile), path.basename(targetfile) .. ".a"))) + table.insert(flags_extra, "-Wl,--out-implib," .. os.args(path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib"))) end -- make link args -- cgit v1.3.1