diff options
| author | as564335sa <[email protected]> | 2022-08-22 15:14:15 +0800 |
|---|---|---|
| committer | as564335sa <[email protected]> | 2022-08-22 15:14:15 +0800 |
| commit | b6b38e5ca97d5056e8f2b6941a8121d6c9c3a79f (patch) | |
| tree | aeaada8c929d150499c65ec9627653efa16c6b25 | |
| parent | a705771770c4d049b1273ee04b19a4ce4737e0fb (diff) | |
fix
| -rw-r--r-- | xmake/modules/core/tools/armasm.lua | 11 |
1 files 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 |
