From 147deb01313f6c6523883a6dd34d771d3df426bb Mon Sep 17 00:00:00 2001 From: star9029 Date: Sat, 9 Sep 2023 17:48:29 +0800 Subject: improve xmake.lua --- xmake/rules/mode/xmake.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/rules/mode/xmake.lua b/xmake/rules/mode/xmake.lua index 790ce011f..a230c5fc5 100644 --- a/xmake/rules/mode/xmake.lua +++ b/xmake/rules/mode/xmake.lua @@ -18,6 +18,8 @@ -- @file xmake.lua -- +import("lib.detect.find_tool") + -- define rule: debug mode rule("mode.debug") on_config(function (target) @@ -213,7 +215,7 @@ rule("mode.asan") local envs = target:toolchain("msvc"):runenvs() local vscmd_ver = envs["VSCMD_VER"] if vscmd_ver and vscmd_ver:startswith("17.7") then - local cl = assert(import("lib.detect.find_tool")("cl", {envs = envs}), "cl not found!") + local cl = assert(find_tool("cl", {envs = envs}), "cl not found!") target:add("runenvs", "PATH", path.directory(cl.program)) end end -- cgit v1.3.1