summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-16 20:55:57 +0800
committerGitHub <[email protected]>2021-09-16 20:55:57 +0800
commit388ee60e90ade5ff712314d96036bbb3e789a3ea (patch)
tree9ffed2624f209252129bb6052abea753941120ed /xmake/modules/core
parent646b616d40835ef4c882f15df1f15574af2cfe58 (diff)
parent8e41cd06d4f77d7a3f8544be7d719ea399412d93 (diff)
Merge pull request #1675 from xmake-io/mingw
improve mingw implib
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/gcc.lua2
-rw-r--r--xmake/modules/core/tools/nvcc.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 89b732ec9..713cd80aa 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -334,7 +334,7 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags, opt)
-- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc
if targetkind == "shared" and is_plat("mingw") then
- table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib"))
+ table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".dll.a"))
end
-- init arguments
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 1ca09401e..41093c502 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -259,9 +259,9 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags)
end
-- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc
- if targetkind == "shared" and config.plat() == "mingw" then
+ if targetkind == "shared" and is_plat("mingw") then
table.insert(flags_extra, "-Xlinker")
- table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".lib"))
+ table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".dll.a"))
end
-- make link args