summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/msbuild.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-03 00:34:08 +0800
committerruki <[email protected]>2021-07-03 00:34:08 +0800
commit9068e48983a41c30a020c302913fbdb4e4c66f9e (patch)
tree1ef415646d3b6e2765c51b4393661575ed90c6ee /xmake/modules/package/tools/msbuild.lua
parentc44d6060e82fc332e0f7370398bcbbaed7278543 (diff)
add os.joinenvs
Diffstat (limited to 'xmake/modules/package/tools/msbuild.lua')
-rw-r--r--xmake/modules/package/tools/msbuild.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua
index 4c322c1f6..b9794a4e3 100644
--- a/xmake/modules/package/tools/msbuild.lua
+++ b/xmake/modules/package/tools/msbuild.lua
@@ -23,9 +23,16 @@ import("core.base.option")
import("core.tool.toolchain")
import("lib.detect.find_tool")
+-- 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)
- return table.copy(toolchain.load("msvc"):runenvs())
+ return os.joinenvs(_get_msvc(package):runenvs())
end
-- build package