summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/go.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-11 14:51:52 +0800
committerruki <[email protected]>2017-07-11 14:51:52 +0800
commit410a36dad68dc1f0b2ac9c12d861af7ab8d0b1d6 (patch)
treee33e94caea84d3a170f6dd86c36ac2e4adbd6687 /xmake/modules/core/tools/go.lua
parent03420ca44581f299a48935ca60af4824575cd9c1 (diff)
rename has_flag to has_flags
Diffstat (limited to 'xmake/modules/core/tools/go.lua')
-rw-r--r--xmake/modules/core/tools/go.lua26
1 files changed, 10 insertions, 16 deletions
diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua
index a3b49c8c4..46b434e58 100644
--- a/xmake/modules/core/tools/go.lua
+++ b/xmake/modules/core/tools/go.lua
@@ -55,16 +55,11 @@ function nf_optimize(self, level)
-- the maps
local maps =
{
- none = "-N"
- , fast = ""
- , faster = ""
- , fastest = ""
- , smallest = ""
- , aggressive = ""
+ none = "-N"
}
-- make it
- return maps[level] or ""
+ return maps[level]
end
-- make the symbol flag
@@ -72,18 +67,17 @@ function nf_symbol(self, level, target, mapkind)
-- only for compiler
if mapkind ~= "object" then
- return ""
+ return
end
-- the maps
local maps =
{
- debug = "-E"
- , hidden = ""
+ debug = "-E"
}
-- make it
- return maps[level] or ""
+ return maps[level]
end
-- make the strip flag
@@ -92,22 +86,22 @@ function nf_strip(self, level)
-- the maps
local maps =
{
- debug = "-s"
- , all = "-s"
+ debug = "-s"
+ , all = "-s"
}
-- make it
- return maps[level] or ""
+ return maps[level]
end
-- make the includedir flag
function nf_includedir(self, dir)
- return "-I " .. dir
+ return {"-I", dir}
end
-- make the linkdir flag
function nf_linkdir(self, dir)
- return "-L " .. dir
+ return {"-L", dir}
end
-- make the link command