diff options
| author | ruki <[email protected]> | 2021-01-30 16:25:33 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-01-30 16:25:33 +0800 |
| commit | 80df14243be88ffd1714ed3522653d6c9b54c923 (patch) | |
| tree | cbb192155ca07793f89e8bd1bb79bfacb0977eb6 | |
| parent | 7f0bdcf280e617307a9b5895d3a4953c884e88a3 (diff) | |
improve to find zig
| -rw-r--r-- | xmake/toolchains/zig/xmake.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua index a1cd26efe..b22d771f4 100644 --- a/xmake/toolchains/zig/xmake.lua +++ b/xmake/toolchains/zig/xmake.lua @@ -38,9 +38,15 @@ toolchain("zig") table.join2(paths, envs.PATH) end end - local zig = find_tool("zig", {program = get_config("zc"), paths = paths}) - if zig and zig.program then - toolchain:config_set("zig", zig.program) + local zig = get_config("zc") + if not zig then + zig = find_tool("zig", {paths = paths}) + if zig and zig.program then + zig = zig.program + end + end + if zig then + toolchain:config_set("zig", zig) toolchain:configs_save() return true end |
