diff options
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/link.lua | 2 | ||||
| -rwxr-xr-x | xmake/modules/detect/sdks/find_vstudio.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_cl.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_link.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_rc.lua | 2 |
5 files changed, 13 insertions, 7 deletions
diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index 98dc98982..f6c775014 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -126,7 +126,7 @@ function link(self, objectfiles, targetkind, targetfile, flags, opt) try { function () - + -- use vstool to link and enable vs_unicode_output @see https://github.com/xmake-io/xmake/issues/528 local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags, opt) vstool.runv(program, argv, {envs = self:runenvs()}) diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua index 8add4638c..ea651845b 100755 --- a/xmake/modules/detect/sdks/find_vstudio.lua +++ b/xmake/modules/detect/sdks/find_vstudio.lua @@ -114,6 +114,16 @@ function _load_vcvarsall(vcvarsall, vsver, arch, opt) variables["UCRTVersion"] = UCRTVersion end + -- convert path/lib/include to PATH/LIB/INCLUDE + variables.PATH = variables.path + variables.LIB = variables.lib + variables.LIBPATH = variables.libpath + variables.INCLUDE = variables.include + variables.path = nil + variables.lib = nil + variables.include = nil + variables.libpath = nil + -- ok return variables end diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua index a6f5d2fa6..b0ca7fa4b 100644 --- a/xmake/modules/detect/tools/find_cl.lua +++ b/xmake/modules/detect/tools/find_cl.lua @@ -46,12 +46,10 @@ function main(opt) -- find program version local version = nil if program and opt and opt.version then - opt.command = opt.command or function () local _, info = os.iorun(program); return info end + opt.command = opt.command or function () local _, info = os.iorunv(program, {}, {envs = opt.envs}); return info end opt.parse = opt.parse or function (output) return output:match("Version (%d+%.?%d*%.?%d*.-)%s") end version = find_programver(program, opt) end - - -- ok? return program, version end diff --git a/xmake/modules/detect/tools/find_link.lua b/xmake/modules/detect/tools/find_link.lua index 5814cba09..dd6c6a24a 100644 --- a/xmake/modules/detect/tools/find_link.lua +++ b/xmake/modules/detect/tools/find_link.lua @@ -43,7 +43,7 @@ function main(opt) -- init options opt = opt or {} opt.check = opt.check or function (program) - + -- find cl local cl = assert(find_tool("cl", {envs = opt.envs})) diff --git a/xmake/modules/detect/tools/find_rc.lua b/xmake/modules/detect/tools/find_rc.lua index aa205c187..372417b17 100644 --- a/xmake/modules/detect/tools/find_rc.lua +++ b/xmake/modules/detect/tools/find_rc.lua @@ -78,8 +78,6 @@ function main(opt) if program and opt and opt.version then version = find_programver(program, opt) end - - -- ok? return program, version end |
