diff options
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/tool/toolchain.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua index 46bd9fb1d..48867300e 100644 --- a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua +++ b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua @@ -28,7 +28,8 @@ local project = require("project/project") local raise = require("sandbox/modules/raise") -- inherit some builtin interfaces -sandbox_core_tool_toolchain.apis = toolchain.apis +sandbox_core_tool_toolchain.apis = toolchain.apis +sandbox_core_tool_toolchain.directories = toolchain.directories -- get all toolchains list function sandbox_core_tool_toolchain.list() diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index e761cb9a7..8b5892483 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -23,9 +23,13 @@ import("lib.detect.find_program") import("lib.detect.find_programver") import("lib.detect.find_toolname") import("core.base.semver") +import("core.tool.toolchain") -- find tool from modules function _find_from_modules(name, opt) + -- TODO + print(toolchain.directories()) + local find_tool = import("detect.tools.find_" .. name, {try = true}) if find_tool then local program, version, toolname = find_tool(opt) |
