Skip to content

Commit

Permalink
get toolchain dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jan 24, 2025
1 parent 512fe92 commit 4758d5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xmake/core/sandbox/modules/import/core/tool/toolchain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions xmake/modules/lib/detect/find_tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4758d5f

Please sign in to comment.