diff options
| author | ruki <[email protected]> | 2022-02-10 00:38:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-02-10 00:38:19 +0800 |
| commit | 039b8b2b3dd2594c2149da5c5ccb28747de782eb (patch) | |
| tree | 40fad5e7e35ca9197a960e6beea91edb31212026 /xmake/modules/package/tools/xmake.lua | |
| parent | 0f3c0abb00dddcb71a0aba5220ef0dd6ed260a24 (diff) | |
load toolchain from datafile
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 4a1908307..53f977911 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -178,7 +178,14 @@ function _get_package_toolchains_envs(package, opt) -- pass custom toolchains definition in project for _, toolchain_inst in ipairs(toolchains_custom) do - print("pass", toolchain_inst:name()) + local toolchains_file = os.tmpfile() + dprint("passing toolchain(%s) to %s", toolchain_inst:name(), toolchains_file) + local ok, errors = toolchain_inst:savefile(toolchains_file) + if not ok then + raise("save toolchain failed, %s", errors or "unknown") + end + envs.XMAKE_TOOLCHAIN_DATAFILES = envs.XMAKE_TOOLCHAIN_DATAFILES or {} + table.insert(envs.XMAKE_TOOLCHAIN_DATAFILES, toolchains_file) end end return envs |
