diff options
| author | Jack <[email protected]> | 2022-12-30 08:30:16 +0800 |
|---|---|---|
| committer | Jack <[email protected]> | 2022-12-30 08:30:16 +0800 |
| commit | 2c4d597e6c25f5212d9f410a4edd0c62d03629d3 (patch) | |
| tree | be92c5e8856c727da2dc48edd21bd3068e2e71ee /xmake/modules/core/tools/c51.lua | |
| parent | dd07f27ebe1425ced29154abc89a985cf9152816 (diff) | |
Implement suggestions from code review
Diffstat (limited to 'xmake/modules/core/tools/c51.lua')
| -rw-r--r-- | xmake/modules/core/tools/c51.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/c51.lua b/xmake/modules/core/tools/c51.lua index af87661b4..4c4696a78 100644 --- a/xmake/modules/core/tools/c51.lua +++ b/xmake/modules/core/tools/c51.lua @@ -37,11 +37,11 @@ local paths = {} -- make the includedir flag function nf_includedirs(self, dirs) --- local paths = {} + --local paths = {} for _, dir in ipairs(dirs) do table.insert(paths, path.translate(dir)) end - if #paths > 0 then + if #paths > 0 then return {"INCDIR(" .. table.concat(paths, ";") .. ")"} end end @@ -55,10 +55,10 @@ end -- make the compile arguments list function compargv(self, sourcefile, objectfile, flags) - table.insert(flags, 1, "OBJECT(" .. objectfile .. ")") - table.insert(flags, 2, "PRINT(" .. objectfile:gsub(".c.obj", ".lst") .. ")") + table.insert(flags, "OBJECT(" .. objectfile .. ")") + table.insert(flags, "PRINT(" .. objectfile:gsub(".c.obj", ".lst") .. ")") if #paths > 0 then - table.insert(flags, 3, "INCDIR(" .. table.concat(paths, ";") .. ")") + table.insert(flags, "INCDIR(" .. table.concat(paths, ";") .. ")") end return self:program(), table.join(sourcefile, flags) end |
