diff options
| author | ruki <[email protected]> | 2025-09-07 22:03:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-07 22:03:37 +0800 |
| commit | a6ba93f895b4b2128c3b310bea24c072e9d3a702 (patch) | |
| tree | 272e52220afa3ee7d6a98632be4897954c031ad1 | |
| parent | 341a067561a88e0e5fbb01862d150173c01d8ee8 (diff) | |
optimize to save toolchain cache
35 files changed, 39 insertions, 53 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index d883878f5..8560cb1bd 100644 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.base.global") import("core.base.task") +import("core.tool.toolchain") import("core.project.rule") import("core.project.config") import("core.project.project") @@ -126,6 +127,9 @@ function build_targets(targetnames, opt) -- do check check_targets(targetnames, {build = true}) + -- save toolchain configs + toolchain.save() + -- dump cache stats if option.get("diagnosis") then build_cache.dump_stats() @@ -141,6 +145,9 @@ function build_targets(targetnames, opt) -- do rules after building _do_project_rules("build_after", {errors = errors}) + -- save toolchain configs + toolchain.save() + -- raise if errors then raise(errors) diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 91b246e96..9a03c2992 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.base.global") import("core.base.hashset") +import("core.tool.toolchain") import("core.project.config") import("core.project.project") import("core.platform.platform") @@ -444,6 +445,9 @@ force to build in current directory via run `xmake -P .`]], os.projectdir()) localcache.set("config", "options", options) localcache.save("config") + -- save toolchain cache + toolchain.save() + -- unlock the whole project project.unlock() end diff --git a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua index 79b1e1c1f..922074cac 100644 --- a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua +++ b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua @@ -30,6 +30,7 @@ local raise = require("sandbox/modules/raise") -- inherit some builtin interfaces sandbox_core_tool_toolchain.apis = toolchain.apis sandbox_core_tool_toolchain.directories = toolchain.directories +sandbox_core_tool_toolchain.save = toolchain.save -- get all toolchains list function sandbox_core_tool_toolchain.list() diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index 342170ed8..188bbdbdf 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -48,13 +48,18 @@ function _instance.new(name, info, cachekey, is_builtin, configs) if #parts > 0 then instance._NAMESPACE = table.concat(parts, "::") end - instance._INFO = info - instance._IS_BUILTIN = is_builtin - instance._CACHE = toolchain._localcache() - instance._CACHEKEY = cachekey - instance._CONFIGS = instance._CACHE:get(cachekey) or {} + instance._INFO = info + instance._IS_BUILTIN = is_builtin + instance._CACHE = toolchain._localcache() + instance._CACHEKEY = cachekey + local toolchain_configs = instance._CACHE:get(cachekey) + if toolchain_configs == nil then + toolchain_configs = {} + instance._CACHE:set(cachekey, toolchain_configs) + end + instance._CONFIGS = toolchain_configs for k, v in pairs(configs) do - instance._CONFIGS[k] = v + toolchain_configs[k] = v end -- is global toolchain for the whole platform? configs.plat = nil @@ -63,7 +68,7 @@ function _instance.new(name, info, cachekey, is_builtin, configs) local plat = config.get("plat") or os.host() local arch = config.get("arch") or os.arch() if instance:is_plat(plat) and instance:is_arch(arch) and #table.keys(configs) == 0 then - instance._CONFIGS.__global = true + toolchain_configs.__global = true end return instance end @@ -281,10 +286,9 @@ function _instance:config_set(name, data) self._CONFIGS[name] = data end --- save user configs +-- save user config (deprecated) function _instance:configs_save() - self._CACHE:set(self:cachekey(), self._CONFIGS) - self._CACHE:save() + utils.warning("toolchain:configs_save() is deprecated, please remove it.") end -- do check, we only check it once for all architectures @@ -305,7 +309,6 @@ function _instance:check() -- we need to persist this state checked = checked or false self:config_set("__checked", checked) - self:configs_save() end return checked end @@ -828,7 +831,6 @@ function toolchain.tool(toolchains, toolkind, opt) cache:set2(cachekey, "program", program) cache:set2(cachekey, "toolname", toolname) cache:set2(cachekey, "toolchain_info", toolchain_info) - cache:save() end return program, toolname, toolchain_info end @@ -871,5 +873,13 @@ function toolchain.toolconfig(toolchains, name, opt) return toolconfig or nil end +-- save all configs to the local cache +-- +-- @see flushing localcache for each test is too slow, +-- so we only flush the toolchain configuration cache once after the configuration is completed. +function toolchain.save() + toolchain._localcache():save() +end + -- return module return toolchain diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 613a41404..08c10ca60 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.base.semver") import("core.base.hashset") +import("core.tool.toolchain") import("core.project.config") import("core.project.project") import("core.platform.platform") @@ -484,6 +485,9 @@ function main(outputdir, vsinfo) -- update config files generate_configfiles() + -- save toolchain configs + toolchain.save() + -- ensure to enter project directory os.cd(project.directory()) diff --git a/xmake/toolchains/armcc/xmake.lua b/xmake/toolchains/armcc/xmake.lua index 64216075b..95b54bdae 100644 --- a/xmake/toolchains/armcc/xmake.lua +++ b/xmake/toolchains/armcc/xmake.lua @@ -37,7 +37,6 @@ toolchain("armcc") local mdk = find_mdk() if mdk and mdk.sdkdir_armcc and find_tool("armcc") then toolchain:config_set("sdkdir", mdk.sdkdir_armcc) - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/armclang/xmake.lua b/xmake/toolchains/armclang/xmake.lua index 8d494af00..1601c8fab 100644 --- a/xmake/toolchains/armclang/xmake.lua +++ b/xmake/toolchains/armclang/xmake.lua @@ -44,7 +44,6 @@ toolchain("armclang") else toolchain:config_set("toolset_as", "armasm") end - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/c51/xmake.lua b/xmake/toolchains/c51/xmake.lua index ee20c2a46..8e186674a 100644 --- a/xmake/toolchains/c51/xmake.lua +++ b/xmake/toolchains/c51/xmake.lua @@ -36,7 +36,6 @@ toolchain("c51") local c51 = find_c51() if c51 and c51.sdkdir and find_tool("c51") then toolchain:config_set("sdkdir", c51.sdkdir) - toolchain:configs_save() return true end - end)
\ No newline at end of file + end) diff --git a/xmake/toolchains/clang-cl/check.lua b/xmake/toolchains/clang-cl/check.lua index df05f4a38..8925e9ee2 100644 --- a/xmake/toolchains/clang-cl/check.lua +++ b/xmake/toolchains/clang-cl/check.lua @@ -98,7 +98,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) if clang_cl and clang_cl.version then cprint("checking for LLVM Clang C/C++ Compiler (%s) version ... ${color.success}%s", toolchain:arch(), clang_cl.version) diff --git a/xmake/toolchains/cosmocc/check.lua b/xmake/toolchains/cosmocc/check.lua index ef673b5fc..b29496b6c 100644 --- a/xmake/toolchains/cosmocc/check.lua +++ b/xmake/toolchains/cosmocc/check.lua @@ -67,7 +67,6 @@ function main(toolchain) if envs then toolchain:config_set("envs", envs) end - toolchain:configs_save() else raise("cosmocc toolchain not found!") end diff --git a/xmake/toolchains/cross/check.lua b/xmake/toolchains/cross/check.lua index 49cd94616..1f34cfa0f 100644 --- a/xmake/toolchains/cross/check.lua +++ b/xmake/toolchains/cross/check.lua @@ -52,7 +52,6 @@ function main(toolchain) toolchain:config_set("cross", cross_toolchain.cross) toolchain:config_set("bindir", cross_toolchain.bindir) toolchain:config_set("sdkdir", cross_toolchain.sdkdir) - toolchain:configs_save() -- init default target os if not config.get("target_os") then config.set("target_os", "linux", {readonly = true, force = true}) diff --git a/xmake/toolchains/dlang/check.lua b/xmake/toolchains/dlang/check.lua index 3325bc736..5e7435d23 100644 --- a/xmake/toolchains/dlang/check.lua +++ b/xmake/toolchains/dlang/check.lua @@ -44,7 +44,6 @@ function main(toolchain) toolchain:config_set("cross", cross_toolchain.cross) toolchain:config_set("bindir", cross_toolchain.bindir) toolchain:config_set("sdkdir", cross_toolchain.sdkdir) - toolchain:configs_save() else raise("cross toolchain not found!") end diff --git a/xmake/toolchains/dpcpp/check.lua b/xmake/toolchains/dpcpp/check.lua index 21526601e..b6307e41d 100644 --- a/xmake/toolchains/dpcpp/check.lua +++ b/xmake/toolchains/dpcpp/check.lua @@ -37,7 +37,6 @@ function main(toolchain) cprint("checking for Intel Data Parallel C++ (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("icxenv", icxenv) toolchain:config_set("bindir", icxenv.bindir) - toolchain:configs_save() return true end return true diff --git a/xmake/toolchains/emcc/xmake.lua b/xmake/toolchains/emcc/xmake.lua index 5bc0674ad..3d64019e6 100644 --- a/xmake/toolchains/emcc/xmake.lua +++ b/xmake/toolchains/emcc/xmake.lua @@ -53,7 +53,6 @@ toolchain("emcc") if emsdk then toolchain:config_set("bindir", emsdk.emscripten) toolchain:config_set("sdkdir", emsdk.sdkdir) - toolchain:configs_save() return emsdk end return find_tool("emcc") diff --git a/xmake/toolchains/gdc/check.lua b/xmake/toolchains/gdc/check.lua index dbb71c8db..8dfe539b4 100644 --- a/xmake/toolchains/gdc/check.lua +++ b/xmake/toolchains/gdc/check.lua @@ -44,7 +44,6 @@ function main(toolchain) toolchain:config_set("cross", cross_toolchain.cross) toolchain:config_set("bindir", cross_toolchain.bindir) toolchain:config_set("sdkdir", cross_toolchain.sdkdir) - toolchain:configs_save() else raise("cross toolchain not found!") end diff --git a/xmake/toolchains/hdk/check.lua b/xmake/toolchains/hdk/check.lua index 9eed6ecad..7224d428e 100644 --- a/xmake/toolchains/hdk/check.lua +++ b/xmake/toolchains/hdk/check.lua @@ -42,7 +42,6 @@ function _check_hdk(toolchain) toolchain:config_set("sdkdir", hdk.sdkdir) toolchain:config_set("bindir", hdk.bindir) toolchain:config_set("sysroot", hdk.sysroot) - toolchain:configs_save() return true else --[[TODO we also need to add this tips when use remote hdk toolchain diff --git a/xmake/toolchains/icc/check.lua b/xmake/toolchains/icc/check.lua index 51a1e9db0..002b9e191 100644 --- a/xmake/toolchains/icc/check.lua +++ b/xmake/toolchains/icc/check.lua @@ -95,7 +95,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) else cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) @@ -122,7 +121,6 @@ function _check_intel_on_windows(toolchain) if tool then cprint("checking for Intel C/C++ Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("varsall", iclvarsall) - toolchain:configs_save() return _check_vstudio(toolchain) end end @@ -143,7 +141,6 @@ function _check_intel_on_linux(toolchain) cprint("checking for Intel C/C++ Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("iccenv", iccenv) toolchain:config_set("bindir", iccenv.bindir) - toolchain:configs_save() return true end return true diff --git a/xmake/toolchains/icx/check.lua b/xmake/toolchains/icx/check.lua index 983f42f49..c781f5c8a 100644 --- a/xmake/toolchains/icx/check.lua +++ b/xmake/toolchains/icx/check.lua @@ -95,7 +95,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) else cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) @@ -122,7 +121,6 @@ function _check_intel_on_windows(toolchain) if tool then cprint("checking for Intel LLVM C/C++ Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("varsall", icxvarsall) - toolchain:configs_save() return _check_vstudio(toolchain) end end @@ -143,7 +141,6 @@ function _check_intel_on_linux(toolchain) cprint("checking for Intel C/C++ Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("icxenv", icxenv) toolchain:config_set("bindir", icxenv.bindir) - toolchain:configs_save() return true end return true diff --git a/xmake/toolchains/ifort/check.lua b/xmake/toolchains/ifort/check.lua index 23a035455..ac8f31c6e 100644 --- a/xmake/toolchains/ifort/check.lua +++ b/xmake/toolchains/ifort/check.lua @@ -95,7 +95,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) else cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) @@ -122,7 +121,6 @@ function _check_intel_on_windows(toolchain) if tool then cprint("checking for Intel Fortran Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("varsall", ifortvarsall) - toolchain:configs_save() return _check_vstudio(toolchain) end end @@ -143,7 +141,6 @@ function _check_intel_on_linux(toolchain) cprint("checking for Intel Fortran Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("ifortenv", ifortenv) toolchain:config_set("bindir", ifortenv.bindir) - toolchain:configs_save() return true end return true diff --git a/xmake/toolchains/ifx/check.lua b/xmake/toolchains/ifx/check.lua index 8e3b0ced0..75264e14e 100644 --- a/xmake/toolchains/ifx/check.lua +++ b/xmake/toolchains/ifx/check.lua @@ -95,7 +95,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) else cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) @@ -122,7 +121,6 @@ function _check_intel_on_windows(toolchain) if tool then cprint("checking for Intel LLVM Fortran Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("varsall", ifxvarsall) - toolchain:configs_save() return _check_vstudio(toolchain) end end @@ -143,7 +141,6 @@ function _check_intel_on_linux(toolchain) cprint("checking for Intel Fortran Compiler (%s) ... ${color.success}${text.success}", toolchain:arch()) toolchain:config_set("ifxenv", ifxenv) toolchain:config_set("bindir", ifxenv.bindir) - toolchain:configs_save() return true end return true diff --git a/xmake/toolchains/iverilog/xmake.lua b/xmake/toolchains/iverilog/xmake.lua index e120a773f..94b781bb5 100644 --- a/xmake/toolchains/iverilog/xmake.lua +++ b/xmake/toolchains/iverilog/xmake.lua @@ -49,6 +49,5 @@ toolchain("iverilog") cprint("${dim}checking for vvp ... ${color.nothing}${text.nothing}") raise("iverilog not found!") end - toolchain:configs_save() return true end) diff --git a/xmake/toolchains/kotlin-native/xmake.lua b/xmake/toolchains/kotlin-native/xmake.lua index bc6fa95f9..5e72b0ec1 100644 --- a/xmake/toolchains/kotlin-native/xmake.lua +++ b/xmake/toolchains/kotlin-native/xmake.lua @@ -73,7 +73,6 @@ toolchain("kotlin-native") toolchain:config_set("sdkdir", path.directory(bindir)) toolchain:config_set("runenvs", runenvs) end - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/ldc/check.lua b/xmake/toolchains/ldc/check.lua index 82e8696ff..c8ba89bf8 100644 --- a/xmake/toolchains/ldc/check.lua +++ b/xmake/toolchains/ldc/check.lua @@ -44,7 +44,6 @@ function main(toolchain) toolchain:config_set("cross", cross_toolchain.cross) toolchain:config_set("bindir", cross_toolchain.bindir) toolchain:config_set("sdkdir", cross_toolchain.sdkdir) - toolchain:configs_save() else raise("cross toolchain not found!") end diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index 21ddd363a..54901824a 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -62,7 +62,6 @@ function _find_xcode(toolchain) toolchain:config_set("xcode_sdkver", xcode_sdkver) toolchain:config_set("target_minver", target_minver) toolchain:config_set("appledev", appledev) - toolchain:configs_save() cprint("checking for SDK version of Xcode for %s (%s) ... ${color.success}%s", toolchain:plat(), toolchain:arch(), xcode_sdkver) end @@ -115,7 +114,6 @@ function main(toolchain) toolchain:config_set("cross", cross) toolchain:config_set("bindir", cross_toolchain.bindir) toolchain:config_set("sdkdir", cross_toolchain.sdkdir) - toolchain:configs_save() else raise("llvm toolchain not found!") end diff --git a/xmake/toolchains/masm32/xmake.lua b/xmake/toolchains/masm32/xmake.lua index f7534c3ab..a943cd6fd 100644 --- a/xmake/toolchains/masm32/xmake.lua +++ b/xmake/toolchains/masm32/xmake.lua @@ -36,7 +36,6 @@ toolchain("masm32") if masm32 and masm32.sdkdir and masm32.bindir and find_tool("ml.exe", {program = path.join(masm32.bindir, "ml.exe")}) then toolchain:config_set("sdkdir", masm32.sdkdir) toolchain:config_set("bindir", masm32.bindir) - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/mingw/check.lua b/xmake/toolchains/mingw/check.lua index 17ae0ea3c..fbb647661 100644 --- a/xmake/toolchains/mingw/check.lua +++ b/xmake/toolchains/mingw/check.lua @@ -41,7 +41,6 @@ function main(toolchain) toolchain:config_set("mingw", mingw.sdkdir) toolchain:config_set("cross", mingw.cross) toolchain:config_set("bindir", mingw.bindir) - toolchain:configs_save() return true end end diff --git a/xmake/toolchains/msvc/check.lua b/xmake/toolchains/msvc/check.lua index df381ec69..01a81ad93 100644 --- a/xmake/toolchains/msvc/check.lua +++ b/xmake/toolchains/msvc/check.lua @@ -89,7 +89,6 @@ function _check_vstudio(toolchain) config.set("vs", vs, {force = true, readonly = true}) end toolchain:config_set("vs", vs) - toolchain:configs_save() cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) if msvc and msvc.version then cprint("checking for Microsoft C/C++ Compiler (%s) version ... ${color.success}%s", toolchain:arch(), msvc.version) diff --git a/xmake/toolchains/ndk/check.lua b/xmake/toolchains/ndk/check.lua index 6c59ca3a4..2845623c1 100644 --- a/xmake/toolchains/ndk/check.lua +++ b/xmake/toolchains/ndk/check.lua @@ -55,7 +55,6 @@ function _check_ndk(toolchain) toolchain:config_set("ndk_sdkver", ndk.sdkver) toolchain:config_set("ndk_toolchains_ver", ndk.toolchains_ver) toolchain:config_set("ndk_sysroot", ndk.sysroot) - toolchain:configs_save() return true else --[[TODO we also need to add this tips when use remote ndk toolchain @@ -73,7 +72,6 @@ function _check_android_sdk(toolchain) if sdk then toolchain:config_set("android_sdk", sdk.sdkdir) toolchain:config_set("build_toolver", sdk.build_toolver) - toolchain:configs_save() end end diff --git a/xmake/toolchains/nim/xmake.lua b/xmake/toolchains/nim/xmake.lua index 73ec3b0df..a0f28e34d 100644 --- a/xmake/toolchains/nim/xmake.lua +++ b/xmake/toolchains/nim/xmake.lua @@ -40,7 +40,6 @@ toolchain("nim") end if nim then toolchain:config_set("nim", nim) - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/sdcc/check.lua b/xmake/toolchains/sdcc/check.lua index 1e7807ec9..fbe76a8e5 100644 --- a/xmake/toolchains/sdcc/check.lua +++ b/xmake/toolchains/sdcc/check.lua @@ -31,7 +31,6 @@ function main(toolchain) if cross_toolchain then toolchain:config_set("cross", cross_toolchain.cross) toolchain:config_set("bindir", cross_toolchain.bindir) - toolchain:configs_save() return true end return find_tool("sdcc") diff --git a/xmake/toolchains/tinycc/xmake.lua b/xmake/toolchains/tinycc/xmake.lua index a4aae0b06..1dba13675 100644 --- a/xmake/toolchains/tinycc/xmake.lua +++ b/xmake/toolchains/tinycc/xmake.lua @@ -45,7 +45,6 @@ toolchain("tinycc") if os.isfile(tcc.program) then toolchain:config_set("bindir", path.directory(tcc.program)) end - toolchain:configs_save() return true end end) diff --git a/xmake/toolchains/verilator/xmake.lua b/xmake/toolchains/verilator/xmake.lua index 8b3af4cac..e956d0b84 100644 --- a/xmake/toolchains/verilator/xmake.lua +++ b/xmake/toolchains/verilator/xmake.lua @@ -39,7 +39,6 @@ toolchain("verilator") cprint("${dim}checking for verilator ... ${color.nothing}${text.nothing}") raise("verilator not found!") end - toolchain:configs_save() return true end) diff --git a/xmake/toolchains/wasi/xmake.lua b/xmake/toolchains/wasi/xmake.lua index c234a33e9..c1a29d57f 100644 --- a/xmake/toolchains/wasi/xmake.lua +++ b/xmake/toolchains/wasi/xmake.lua @@ -47,7 +47,6 @@ toolchain("wasi") if wasisdk then toolchain:config_set("bindir", wasisdk.bindir) toolchain:config_set("sdkdir", wasisdk.sdkdir) - toolchain:configs_save() return wasisdk end return import("lib.detect.find_tool")("clang", {paths = toolchain:bindir()}) diff --git a/xmake/toolchains/xcode/check.lua b/xmake/toolchains/xcode/check.lua index eece3399f..5cc0ace73 100644 --- a/xmake/toolchains/xcode/check.lua +++ b/xmake/toolchains/xcode/check.lua @@ -152,7 +152,6 @@ function main(toolchain) toolchain:config_set("xcode_sdkver", xcode_sdkver) toolchain:config_set("target_minver", target_minver) toolchain:config_set("appledev", appledev) - toolchain:configs_save() if xcode_sdkver then cprint("checking for SDK version of Xcode for %s (%s) ... ${color.success}%s", toolchain:plat(), toolchain:arch(), xcode_sdkver) end diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua index a88741b5b..87126b787 100644 --- a/xmake/toolchains/zig/xmake.lua +++ b/xmake/toolchains/zig/xmake.lua @@ -67,7 +67,6 @@ toolchain("zig") _setup_zigcc_wrapper(zig) toolchain:config_set("zig", zig) toolchain:config_set("zig_version", zig_version) - toolchain:configs_save() return true end end) |
