From 7f01ecf6da7e040d4b0e27efaa035a8f27533e5e Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 25 Jan 2025 00:00:55 +0800 Subject: add toolchain dirs --- xmake/core/tool/toolchain.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xmake/core/tool/toolchain.lua') diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index a19413d34..1085df198 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -640,6 +640,15 @@ function toolchain.directories() return dirs end +-- add toolchain directories +function toolchain.add_directories(...) + local dirs = toolchain.directories() + for _, dir in ipairs({...}) do + table.insert(dirs, 1, dir) + end + toolchain._DIRS = table.unique(dirs) +end + -- load toolchain function toolchain.load(name, opt) -- cgit v1.3.1