summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-07 22:45:55 +0800
committerruki <[email protected]>2024-07-07 22:45:55 +0800
commit945195e1a2b35908cbec1bd1fa16f84683903545 (patch)
tree21cbcb3b3eece4f90bb72ca924fd9bff6c8ad1b3
parente1986ee24e3dd32186fe7f8b5b9e7175fdf873c4 (diff)
fix find ld
-rw-r--r--xmake/modules/detect/tools/find_ld.lua6
-rw-r--r--xmake/modules/detect/tools/find_ld64_lld.lua1
-rw-r--r--xmake/modules/detect/tools/find_ld_lld.lua1
-rw-r--r--xmake/modules/detect/tools/find_ldc2.lua9
-rw-r--r--xmake/modules/detect/tools/find_lld_link.lua1
5 files changed, 5 insertions, 13 deletions
diff --git a/xmake/modules/detect/tools/find_ld.lua b/xmake/modules/detect/tools/find_ld.lua
index cadcbfeec..802367400 100644
--- a/xmake/modules/detect/tools/find_ld.lua
+++ b/xmake/modules/detect/tools/find_ld.lua
@@ -36,11 +36,7 @@ import("lib.detect.find_program")
-- @endcode
--
function main(opt)
-
- -- init options
- opt = opt or {}
+ opt = opt or {}
opt.norun = true
-
- -- find program
return find_program(opt.program or "ld", opt)
end
diff --git a/xmake/modules/detect/tools/find_ld64_lld.lua b/xmake/modules/detect/tools/find_ld64_lld.lua
index eacfe3899..42dc339d3 100644
--- a/xmake/modules/detect/tools/find_ld64_lld.lua
+++ b/xmake/modules/detect/tools/find_ld64_lld.lua
@@ -21,6 +21,7 @@
-- imports
import("core.tool.compiler")
import("lib.detect.find_program")
+import("lib.detect.find_programver")
-- find ar
--
diff --git a/xmake/modules/detect/tools/find_ld_lld.lua b/xmake/modules/detect/tools/find_ld_lld.lua
index d7078e1d2..430d00bcd 100644
--- a/xmake/modules/detect/tools/find_ld_lld.lua
+++ b/xmake/modules/detect/tools/find_ld_lld.lua
@@ -21,6 +21,7 @@
-- imports
import("core.tool.compiler")
import("lib.detect.find_program")
+import("lib.detect.find_programver")
-- find ar
--
diff --git a/xmake/modules/detect/tools/find_ldc2.lua b/xmake/modules/detect/tools/find_ldc2.lua
index 129c87803..3ab89b018 100644
--- a/xmake/modules/detect/tools/find_ldc2.lua
+++ b/xmake/modules/detect/tools/find_ldc2.lua
@@ -35,21 +35,14 @@ import("lib.detect.find_programver")
-- @endcode
--
function main(opt)
-
- -- init options
opt = opt or {}
opt.command = opt.command or "--version"
opt.parse = opt.parse or function (output) return output:match("%((%d+%.?%d*%.?%d*.-)%)") end
- -- find program
- local program = find_program(opt.program or "ldc2", opt)
-
- -- find program version
local version = nil
+ local program = find_program(opt.program or "ldc2", opt)
if program and opt and opt.version then
version = find_programver(program, opt)
end
-
- -- ok?
return program, version
end
diff --git a/xmake/modules/detect/tools/find_lld_link.lua b/xmake/modules/detect/tools/find_lld_link.lua
index 73f6f5694..18641afdf 100644
--- a/xmake/modules/detect/tools/find_lld_link.lua
+++ b/xmake/modules/detect/tools/find_lld_link.lua
@@ -21,6 +21,7 @@
-- imports
import("core.tool.compiler")
import("lib.detect.find_program")
+import("lib.detect.find_programver")
-- find ar
--