summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-22 16:14:08 +0800
committerGitHub <[email protected]>2022-08-22 16:14:08 +0800
commit0493ab90a22a166b4d0e92cf9b1243ef8ea85525 (patch)
tree3b39f518ec4ce0a8f15f7f0b813af25c47eeaf27
parent644a3172f67f2620896cbf77e155bdc1c07c2ff2 (diff)
parent95d016345759d9e839fdfabb40e19083fbabd52e (diff)
Merge pull request #2706 from as564335sa/dev
修正armasm宏定义的编译选项配置
-rw-r--r--xmake/modules/core/tools/armasm.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/armasm.lua b/xmake/modules/core/tools/armasm.lua
index 3ae578c55..765cdcdb4 100644
--- a/xmake/modules/core/tools/armasm.lua
+++ b/xmake/modules/core/tools/armasm.lua
@@ -100,8 +100,17 @@ function nf_runtime(self, runtime)
end
-- make the define flag
+-- eg.
+-- add_defines("MACRO") -> --pd "MACRO SETA 1
+-- add_defines("MACRO=3") -> --pd "MACRO SETA 3"
function nf_define(self, macro)
- return {"--pd", macro .. " SETA 1"}
+ local def = macro:split("=")
+ local key = def[1]:trim()
+ local value = "1"
+ if #def == 2 then
+ value = def[2]:trim()
+ end
+ return {"--pd", key .. " SETA " .. value}
end
-- make the includedir flag