diff options
Diffstat (limited to 'xmake/modules/package/tools/gn.lua')
| -rw-r--r-- | xmake/modules/package/tools/gn.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/gn.lua b/xmake/modules/package/tools/gn.lua index 2c5341476..362373c2c 100644 --- a/xmake/modules/package/tools/gn.lua +++ b/xmake/modules/package/tools/gn.lua @@ -39,11 +39,18 @@ function _get_configs(package, configs, opt) return configs end +-- get msvc +function _get_msvc(package) + local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}) + assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet + return msvc +end + -- get the build environments function buildenvs(package, opt) local envs = {} if package:is_plat("windows") then - table.join2(envs, toolchain.load("msvc"):runenvs()) + envs = os.joinenvs(_get_msvc(package):runenvs()) end return envs end |
