summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-20 22:45:48 +0800
committerruki <[email protected]>2018-12-20 10:34:48 +0800
commita9f3eac5faf29e1a60b68ec2ac7ec791ef7549ee (patch)
tree5f1b52aeeb8b0773a4508625485411fc5b619ae9
parentc68cf15bf9716576076507643a45bf1adc48f0ea (diff)
fix mingw static link
-rw-r--r--xmake/modules/core/tools/gcc.lua2
-rw-r--r--xmake/modules/core/tools/nvcc.lua2
-rw-r--r--xmake/platforms/mingw/xmake.lua2
3 files changed, 3 insertions, 3 deletions
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
diff --git a/xmake/platforms/mingw/xmake.lua b/xmake/platforms/mingw/xmake.lua
index e1cd53207..e7469750f 100644
--- a/xmake/platforms/mingw/xmake.lua
+++ b/xmake/platforms/mingw/xmake.lua
@@ -35,7 +35,7 @@ platform("mingw")
set_archs("i386", "x86_64")
-- set formats
- set_formats {static = "lib$(name).a", object = "$(name).o", shared = "$(name).dll", binary = "$(name).exe", symbol = "$(name).pdb"}
+ set_formats {static = "$(name).lib", object = "$(name).obj", shared = "$(name).dll", binary = "$(name).exe", symbol = "$(name).pdb"}
-- on check
on_check("check")