summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-27 22:36:35 +0800
committerruki <[email protected]>2021-10-27 22:36:35 +0800
commit71217ef2ce95a70aad0fd1cad05eb462b4612a5b (patch)
tree9dff12c2baa041edb698d5ea37a5cfd565035668
parent1f2e6861e8160fa1584c67d6783b11b2dbd6c85e (diff)
remove some comments
-rw-r--r--xmake/modules/core/tools/dmd.lua8
-rw-r--r--xmake/modules/core/tools/go.lua20
-rw-r--r--xmake/modules/core/tools/ml.lua4
-rw-r--r--xmake/modules/core/tools/rustc.lua16
-rw-r--r--xmake/modules/core/tools/sdcc.lua14
-rw-r--r--xmake/modules/core/tools/zig.lua8
6 files changed, 0 insertions, 70 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index 2a9d860e1..3f29da28f 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -146,11 +146,7 @@ end
-- link the target file
function link(self, objectfiles, targetkind, targetfile, flags)
-
- -- ensure the target directory
os.mkdir(path.directory(targetfile))
-
- -- link it
os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags))
end
@@ -161,11 +157,7 @@ end
-- compile the source file
function compile(self, sourcefile, objectfile, dependinfo, flags)
-
- -- ensure the object directory
os.mkdir(path.directory(objectfile))
-
- -- compile it
os.runv(compargv(self, sourcefile, objectfile, flags))
end
diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua
index fbd046cf0..34d096873 100644
--- a/xmake/modules/core/tools/go.lua
+++ b/xmake/modules/core/tools/go.lua
@@ -35,14 +35,10 @@ end
-- make the optimize flag
function nf_optimize(self, level)
-
- -- the maps
local maps =
{
none = "-N"
}
-
- -- make it
return maps[level]
end
@@ -59,22 +55,16 @@ function nf_symbol(self, level, target, mapkind)
{
debug = "-E"
}
-
- -- make it
return maps[level]
end
-- make the strip flag
function nf_strip(self, level)
-
- -- the maps
local maps =
{
debug = "-s"
, all = "-s"
}
-
- -- make it
return maps[level]
end
@@ -95,8 +85,6 @@ end
-- make the link arguments list
function linkargv(self, objectfiles, targetkind, targetfile, flags)
-
- -- make it
if targetkind == "static" then
return self:program(), table.join("tool", "pack", flags, targetfile, objectfiles)
else
@@ -106,11 +94,7 @@ end
-- link the target file
function link(self, objectfiles, targetkind, targetfile, flags)
-
- -- ensure the target directory
os.mkdir(path.directory(targetfile))
-
- -- link it
local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags)
os.runv(program, argv, {envs = self:runenvs()})
end
@@ -122,11 +106,7 @@ end
-- compile the source file
function compile(self, sourcefiles, objectfile, dependinfo, flags)
-
- -- ensure the object directory
os.mkdir(path.directory(objectfile))
-
- -- compile it
local program, argv = compargv(self, sourcefiles, objectfile, flags)
os.runv(program, argv, {envs = self:runenvs()})
end
diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua
index e9154251d..3550b1a32 100644
--- a/xmake/modules/core/tools/ml.lua
+++ b/xmake/modules/core/tools/ml.lua
@@ -77,8 +77,6 @@ end
-- make the warning flag
function nf_warning(self, level)
-
- -- the maps
local maps =
{
none = "-w"
@@ -88,8 +86,6 @@ function nf_warning(self, level)
, everything = "-W3"
, error = "-WX"
}
-
- -- make it
return maps[level]
end
diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua
index ade2daea4..a30a389af 100644
--- a/xmake/modules/core/tools/rustc.lua
+++ b/xmake/modules/core/tools/rustc.lua
@@ -41,8 +41,6 @@ end
-- make the optimize flag
function nf_optimize(self, level)
-
- -- the maps
local maps =
{
none = "-C opt-level=0"
@@ -52,21 +50,15 @@ function nf_optimize(self, level)
, smallest = "-C opt-level=s"
, aggressive = "-C opt-level=z"
}
-
- -- make it
return maps[level]
end
-- make the symbol flag
function nf_symbol(self, level)
-
- -- the maps
local maps =
{
debug = "-C debuginfo=2"
}
-
- -- make it
return maps[level]
end
@@ -82,11 +74,7 @@ end
-- build the target file
function build(self, sourcefiles, targetkind, targetfile, flags)
-
- -- ensure the target directory
os.mkdir(path.directory(targetfile))
-
- -- build it
os.runv(buildargv(self, sourcefiles, targetkind, targetfile, flags))
end
@@ -97,11 +85,7 @@ end
-- compile the source file
function compile(self, sourcefiles, objectfile, dependinfo, flags)
-
- -- ensure the object directory
os.mkdir(path.directory(objectfile))
-
- -- compile it
os.runv(compargv(self, sourcefiles, objectfile, flags))
end
diff --git a/xmake/modules/core/tools/sdcc.lua b/xmake/modules/core/tools/sdcc.lua
index 0153ed652..4605f12f8 100644
--- a/xmake/modules/core/tools/sdcc.lua
+++ b/xmake/modules/core/tools/sdcc.lua
@@ -68,23 +68,17 @@ end
-- make the warning flag
function nf_warning(self, level)
-
- -- the maps
local maps =
{
none = "--less-pedantic"
, less = "--less-pedantic"
, error = "-Werror"
}
-
- -- make it
return maps[level]
end
-- make the optimize flag
function nf_optimize(self, level)
-
- -- the maps
local maps =
{
none = ""
@@ -94,15 +88,11 @@ function nf_optimize(self, level)
, smallest = "--opt-code-size"
, aggressive = "--opt-code-speed"
}
-
- -- make it
return maps[level]
end
-- make the language flag
function nf_language(self, stdname)
-
- -- the stdc maps
if _g.cmaps == nil then
_g.cmaps =
{
@@ -176,11 +166,7 @@ end
-- link the target file
function link(self, objectfiles, targetkind, targetfile, flags)
-
- -- ensure the target directory
os.mkdir(path.directory(targetfile))
-
- -- link it
os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags))
end
diff --git a/xmake/modules/core/tools/zig.lua b/xmake/modules/core/tools/zig.lua
index 140e1ae0a..f0d6c5d98 100644
--- a/xmake/modules/core/tools/zig.lua
+++ b/xmake/modules/core/tools/zig.lua
@@ -116,11 +116,7 @@ end
-- link the target file
function link(self, objectfiles, targetkind, targetfile, flags)
-
- -- ensure the target directory
os.mkdir(path.directory(targetfile))
-
- -- link it
os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags))
end
@@ -131,11 +127,7 @@ end
-- compile the source file
function compile(self, sourcefile, objectfile, dependinfo, flags)
-
- -- ensure the object directory
os.mkdir(path.directory(objectfile))
-
- -- compile it
os.runv(compargv(self, sourcefile, objectfile, flags))
end