From c7db3018e4e07e70628af2528a3a9210ca924d9b Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 12 Aug 2023 23:22:59 +0800 Subject: improve c51 lst #4067 --- xmake/modules/core/tools/c51.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/modules/core/tools/c51.lua b/xmake/modules/core/tools/c51.lua index d5fb68a92..105c0dbc3 100644 --- a/xmake/modules/core/tools/c51.lua +++ b/xmake/modules/core/tools/c51.lua @@ -64,7 +64,9 @@ end -- make the compile arguments list function compargv(self, sourcefile, objectfile, flags) - return self:program(), table.join(sourcefile, "OBJECT(" .. objectfile .. ")", "PRINT(" .. (objectfile:gsub("%.c%.obj", ".lst")) .. ")", flags) + local lstfile = objectfile:gsub("%.c%.obj", ".lst") + lstfile = lstfile:gsub("%.c%.o$", ".lst") + return self:program(), table.join(sourcefile, "OBJECT(" .. objectfile .. ")", "PRINT(" .. lstfile .. ")", flags) end -- compile the source file -- cgit v1.3.1