summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-29 22:49:37 +0800
committerruki <[email protected]>2026-03-29 22:49:41 +0800
commit1bccfc273af2b1d579d033324bca481e15c58653 (patch)
tree192697793bd61d48b4423da0ac4a1eab804d80dc /xmake/modules/core/tools/cl.lua
parentf4513cc28aa778e1ad0d050511cc7e295fe81e32 (diff)
fix const limit on lua5.5
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index a28d049c3..c945e163b 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -536,6 +536,7 @@ function _preprocess(program, argv, opt)
local sourcefile = argv[#argv]
local extension = path.extension(sourcefile)
for _, flag in ipairs(argv) do
+ local flag = flag
if flag:startswith("-Fo") or flag:startswith("/Fo") then
objectfile = flag:sub(4)
break
@@ -703,6 +704,7 @@ function _show_warnings(self, output, sourcefile)
local has_warnings = false
local has_source_dependencies = _has_source_dependencies(self)
for _, line in ipairs(output:split("\n", {plain = true})) do
+ local line = line
line = line:rtrim()
if #line > 0 then
local skip = false
@@ -806,6 +808,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
else
-- filter includes notes: "Note: including file: xxx.h", @note maybe not english language
for _, line in ipairs(tostring(errors):split("\n", {plain = true})) do
+ local line = line
line = line:rtrim()
if not parse_include.has_include_note(line) then
results = results .. line .. "\r\n"