Skip to content

Commit d14cbde

Browse files
committed
(C++ modules support) move import at the top of the file for msvc support.lua
1 parent e7ca027 commit d14cbde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xmake/rules/c++/modules/msvc/support.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
-- imports
2222
import("core.base.semver")
23+
import("core.tool.toolchain")
2324
import("core.project.config")
2425
import("lib.detect.find_tool")
2526
import(".support", {inherit = true})
@@ -123,7 +124,7 @@ function get_stdmodules(target, opt)
123124
end
124125
local msvc
125126
if opt.toolchain then
126-
msvc = import("core.tool.toolchain", {anonymous = true}).load("msvc", {plat = opt.toolchain:plat(), arch = opt.toolchain:arch()})
127+
msvc = toolchain.load("msvc", {plat = opt.toolchain:plat(), arch = opt.toolchain:arch()})
127128
else
128129
msvc = target:toolchain("msvc")
129130
end

0 commit comments

Comments
 (0)