diff options
| -rw-r--r-- | xmake/modules/core/tools/bl51.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/c51.lua | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/bl51.lua b/xmake/modules/core/tools/bl51.lua index 70c04385b..075a0289c 100644 --- a/xmake/modules/core/tools/bl51.lua +++ b/xmake/modules/core/tools/bl51.lua @@ -28,7 +28,7 @@ end -- make the link arguments list function linkargv(self, objectfiles, targetkind, targetfile, flags) - return self:program(), table.join(objectfiles, "TO", targetfile) + return self:program(), table.join(table.concat(objectfiles, ","), "TO", targetfile) end -- link the target file diff --git a/xmake/modules/core/tools/c51.lua b/xmake/modules/core/tools/c51.lua index c172d0bb6..469fa96fa 100644 --- a/xmake/modules/core/tools/c51.lua +++ b/xmake/modules/core/tools/c51.lua @@ -48,7 +48,7 @@ end -- make the compile arguments list function compargv(self, sourcefile, objectfile, flags) - return self:program(), table.join(sourcefile, flags) + return self:program(), table.join(sourcefile, "OBJECT(" .. objectfile .. ")", "PRINT(" .. (objectfile:gsub("%.c%.obj", ".lst")) .. ")", flags) end -- compile the source file @@ -56,14 +56,11 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) - -- compile it try { function () - local realsourcefile = objectfile:gsub("\\.obj$", "") - os.cp(sourcefile, realsourcefile) - local outdata, errdata = os.iorunv(compargv(self, realsourcefile, objectfile, dependinfo, flags)) + local outdata, errdata = os.iorunv(compargv(self, sourcefile, objectfile, flags)) return (outdata or "") .. (errdata or "") end, catch |
