diff options
| author | ruki <[email protected]> | 2019-06-04 22:41:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-04 10:08:31 +0800 |
| commit | 18663d52e5ff484eea423f88cbf52cc10c5721f3 (patch) | |
| tree | 3e1e147713b4ca50276b676b9b346f52f893708b /xmake/modules/core/tools/gcc.lua | |
| parent | 255d51be7e7ed10a13a4cd55b5aae55079ab4bb9 (diff) | |
improve string.split
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 8396c1746..ad4104cd9 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -425,7 +425,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) os.tryrm(objectfile) -- parse and strip errors - local lines = errors and tostring(errors):split('\n') or {} + local lines = errors and tostring(errors):split('\n', {plain = true}) or {} if not option.get("verbose") then -- find the start line of error @@ -452,7 +452,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) function (ok, outdata, errdata) -- show warnings? if ok and errdata and #errdata > 0 and (option.get("diagnosis") or option.get("warning")) then - local lines = errdata:split('\n') + local lines = errdata:split('\n', {plain = true}) if #lines > 0 then local warnings = table.concat(table.slice(lines, 1, ifelse(#lines > 8, 8, #lines)), "\n") cprint("${color.warning}%s", warnings) |
