From 1f2e6861e8160fa1584c67d6783b11b2dbd6c85e Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 27 Oct 2021 22:35:15 +0800 Subject: add symbols for masm --- xmake/modules/core/tools/ml.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index 83da11fb6..e9154251d 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -20,6 +20,7 @@ -- imports import("private.tools.vstool") +import("core.base.hashset") -- init it -- @@ -57,6 +58,23 @@ function init(self) }) end +-- make the symbol flags +function nf_symbols(self, levels, target) + local flags = nil + local values = hashset.from(levels) + if values:has("debug") then + flags = {} + if values:has("edit") then + table.insert(flags, "-ZI") + elseif values:has("embed") then + table.insert(flags, "-Z7") + else + table.insert(flags, "-Zi") + end + end + return flags +end + -- make the warning flag function nf_warning(self, level) -- cgit v1.3.1