diff options
| author | ruki <[email protected]> | 2021-07-03 00:34:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-07-03 00:34:08 +0800 |
| commit | 9068e48983a41c30a020c302913fbdb4e4c66f9e (patch) | |
| tree | 1ef415646d3b6e2765c51b4393661575ed90c6ee /xmake/modules/package/tools/gn.lua | |
| parent | c44d6060e82fc332e0f7370398bcbbaed7278543 (diff) | |
add os.joinenvs
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 |
