diff options
| author | ruki <[email protected]> | 2022-06-15 00:08:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-06-14 20:12:57 +0800 |
| commit | db62122ed2aab5ea823ea80617e673bfedfeb28b (patch) | |
| tree | 8898612c00662fe41573fc2919a18b38fc9ddb6b /xmake/modules/core/tools/go.lua | |
| parent | c96e777d90a4cec5941896680191f50e47e0d247 (diff) | |
improve optimize for emcc
Diffstat (limited to 'xmake/modules/core/tools/go.lua')
| -rw-r--r-- | xmake/modules/core/tools/go.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua index 2b2b76623..51f5709af 100644 --- a/xmake/modules/core/tools/go.lua +++ b/xmake/modules/core/tools/go.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.project.config") import("core.project.project") +import("core.language.language") -- init it function init(self) @@ -30,10 +31,14 @@ end -- make the optimize flag function nf_optimize(self, level) - local maps = { - none = "-N" - } - return maps[level] + -- only for source kind + local kind = self:kind() + if language.sourcekinds()[kind] then + local maps = { + none = "-N" + } + return maps[level] + end end -- make the symbol flag |
