summaryrefslogtreecommitdiff
path: root/xmake/core/tool/toolchain.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
-rw-r--r--xmake/core/tool/toolchain.lua9
1 files changed, 9 insertions, 0 deletions
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)