diff options
| author | ruki <[email protected]> | 2024-05-23 00:27:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-05-23 00:27:18 +0800 |
| commit | 3ccf27073cb31c6d19be436c634ec1da9a460796 (patch) | |
| tree | c37bf69f182da77b9748f56166653178edd03e19 | |
| parent | 674604842657f3d6a2f998ecc414d2666e9df34a (diff) | |
fix find llvm-ar
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 2 | ||||
| -rw-r--r-- | xmake/toolchains/llvm/check.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua index 3923916d9..aae3c2e4f 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -86,7 +86,7 @@ function sandbox_lib_detect_find_program._check(program, opt) findname = program end if sandbox_lib_detect_find_program._do_check(findname, opt) then - return program + return findname -- check "zig c++" without ".exe" -- https://github.com/xmake-io/xmake/issues/2232 elseif findname ~= program and path.filename(program):find(" ", 1, true) and diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index 6fe57b2aa..1a61962fc 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -74,7 +74,7 @@ function main(toolchain) sdkdir = path.directory(bindir) end elseif is_host("windows") then - local llvm_ar = find_tool("llvm-ar", {force = true, envs = {PATH = os.getenvs("PATH")}}) + local llvm_ar = find_tool("llvm-ar", {force = true, envs = {PATH = os.getenv("PATH")}}) if llvm_ar and llvm_ar.program and os.isfile(llvm_ar.program) then bindir = path.directory(llvm_ar.program) sdkdir = path.directory(bindir) |
