From b6b38e5ca97d5056e8f2b6941a8121d6c9c3a79f Mon Sep 17 00:00:00 2001 From: as564335sa <809885126@qq.com> Date: Mon, 22 Aug 2022 15:14:15 +0800 Subject: fix --- xmake/modules/core/tools/armasm.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/xmake/modules/core/tools/armasm.lua b/xmake/modules/core/tools/armasm.lua index 822d413f0..e9ec41acf 100644 --- a/xmake/modules/core/tools/armasm.lua +++ b/xmake/modules/core/tools/armasm.lua @@ -104,16 +104,13 @@ end -- add_defines("MACRO") -> --pd "MACRO SETA 1 -- add_defines("MACRO=3") -> --pd "MACRO SETA 3" function nf_define(self, macro) - local s = macro:replace(" ", "") - local def = s:split("=") - if def[1] == nil then - return {"--pd", macro .. " SETA 1"} - end + local def = macro:split("=") + local key = def[1]:trim() local value = 1 - if def[2] ~= nil and #def[2] > 0 then + if #def == 2 then value = def[2] end - return {"--pd", def[1] .. " SETA " .. value} + return {"--pd", key .. " SETA " .. value} end -- make the includedir flag -- cgit v1.3.1