diff options
| author | ruki <[email protected]> | 2020-06-17 23:32:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-17 15:13:08 +0800 |
| commit | dcaeda333910bc331fc706394cef7dd8fa81b1fe (patch) | |
| tree | 86dac91ccdcb5f1c308d9f6abb462a49c7c124dd /xmake/modules | |
| parent | 4e63f6c65ebb262333080f663702672eb9787bcf (diff) | |
improve cl to support 8192 limit
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 9 | ||||
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 3 |
2 files changed, 7 insertions, 5 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 { diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua index 3b5bc1368..cee91e18e 100644 --- a/xmake/modules/private/action/build/object.lua +++ b/xmake/modules/private/action/build/object.lua @@ -65,7 +65,8 @@ function _do_build_file(target, sourcefile, opt) -- trace verbose info if verbose then - print(compinst:compcmd(sourcefile, objectfile, {compflags = compflags})) + -- show the full link command with raw arguments, it will expand @xxx.args for msvc/link on windows + print(compinst:compcmd(sourcefile, objectfile, {compflags = compflags, rawargs = true})) end -- compile it |
