summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/gcc.lua6
-rw-r--r--xmake/modules/core/tools/link.lua5
-rw-r--r--xmake/modules/core/tools/nvcc.lua6
3 files changed, 14 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 31b0deea5..b33bf0677 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -276,7 +276,11 @@ end
-- make the link flag
function nf_link(self, lib)
- return "-l" .. lib
+ if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
+ return lib
+ else
+ return "-l" .. lib
+ end
end
-- make the syslink flag
diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua
index 87ba80b88..ee68cf01f 100644
--- a/xmake/modules/core/tools/link.lua
+++ b/xmake/modules/core/tools/link.lua
@@ -100,7 +100,10 @@ end
-- make the link flag
function nf_link(self, lib)
- return lib .. ".lib"
+ if not lib:endswith(".lib") then
+ lib = lib .. ".lib"
+ end
+ return lib
end
-- make the syslink flag
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 17ee920c7..5d5001712 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -229,7 +229,11 @@ end
-- make the link flag
function nf_link(self, lib)
- return "-l" .. lib
+ if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
+ return lib
+ else
+ return "-l" .. lib
+ end
end
-- make the syslink flag