summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-17 23:32:11 +0800
committerruki <[email protected]>2020-06-17 15:13:08 +0800
commitdcaeda333910bc331fc706394cef7dd8fa81b1fe (patch)
tree86dac91ccdcb5f1c308d9f6abb462a49c7c124dd /xmake/modules/core/tools/cl.lua
parent4e63f6c65ebb262333080f663702672eb9787bcf (diff)
improve cl to support 8192 limit
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 8bf8c6232..9f6421c21 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -317,7 +317,7 @@ function _compargv_pch(self, pcheaderfile, pcoutputfile, flags)
end
-- make the compile arguments list
-function compargv(self, sourcefile, objectfile, flags)
+function compargv(self, sourcefile, objectfile, flags, opt)
-- precompiled header?
local extension = path.extension(sourcefile)
@@ -327,11 +327,12 @@ function compargv(self, sourcefile, objectfile, flags)
-- make the compile arguments list
-- @note only flags in nf_xxx() need be wrapped via os.args, @see nf_includedir
- return self:program(), table.join("-c", flags, "-Fo" .. objectfile, sourcefile)
+ local argv = table.join("-c", flags, "-Fo" .. objectfile, sourcefile)
+ return self:program(), (opt and opt.rawargs) and argv or winos.cmdargv(argv)
end
-- compile the source file
-function compile(self, sourcefile, objectfile, dependinfo, flags)
+function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- ensure the object directory
-- @note this path here has been normalized, we can quickly find it by the unique path separator prompt
@@ -352,7 +353,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
end
-- use vstool to compile and enable vs_unicode_output @see https://github.com/xmake-io/xmake/issues/528
- return vstool.iorunv(compargv(self, sourcefile, objectfile, compflags))
+ return vstool.iorunv(compargv(self, sourcefile, objectfile, compflags, opt))
end,
catch
{