From d14cbdeb1a7d84e58d7b17421e0e8904c44aef46 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Mon, 12 May 2025 11:48:30 +0200 Subject: (C++ modules support) move import at the top of the file for msvc support.lua --- xmake/rules/c++/modules/msvc/support.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/rules/c++/modules/msvc/support.lua') diff --git a/xmake/rules/c++/modules/msvc/support.lua b/xmake/rules/c++/modules/msvc/support.lua index 4cb4a7fad..41c5cd44e 100644 --- a/xmake/rules/c++/modules/msvc/support.lua +++ b/xmake/rules/c++/modules/msvc/support.lua @@ -20,6 +20,7 @@ -- imports import("core.base.semver") +import("core.tool.toolchain") import("core.project.config") import("lib.detect.find_tool") import(".support", {inherit = true}) @@ -123,7 +124,7 @@ function get_stdmodules(target, opt) end local msvc if opt.toolchain then - msvc = import("core.tool.toolchain", {anonymous = true}).load("msvc", {plat = opt.toolchain:plat(), arch = opt.toolchain:arch()}) + msvc = toolchain.load("msvc", {plat = opt.toolchain:plat(), arch = opt.toolchain:arch()}) else msvc = target:toolchain("msvc") end -- cgit v1.3.1