diff options
| author | ruki <[email protected]> | 2022-01-07 22:35:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-01-07 22:35:55 +0800 |
| commit | b5298ce3d6ccade7f651756b4f2627bd78478c36 (patch) | |
| tree | 6256ca946d6b0ed689e664fd7e5d47ea13f09218 | |
| parent | 2414e25c660cda85d3b0831b93460a475e482e32 (diff) | |
remove format from builder/tools
| -rw-r--r-- | xmake/core/project/target.lua | 3 | ||||
| -rw-r--r-- | xmake/core/tool/builder.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/core/tools/go.lua | 18 | ||||
| -rw-r--r-- | xmake/rules/go/xmake.lua | 4 |
4 files changed, 8 insertions, 25 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 9a4ca698c..be787619b 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1068,8 +1068,7 @@ function _instance:filename() plat = self:plat(), arch = self:arch(), prefixname = prefixname, suffixname = suffixname, - extension = extension, - format = self:linker():format(targetkind)}) + extension = extension}) end return filename end diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 91bb707f8..343eec0ae 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -442,13 +442,5 @@ function builder:map_flags(name, values, opt) end end --- get the format of the given target kind -function builder:format(targetkind) - local formats = self:get("formats") - if formats then - return formats[targetkind] - end -end - -- return module return builder diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua index 34d096873..2b2b76623 100644 --- a/xmake/modules/core/tools/go.lua +++ b/xmake/modules/core/tools/go.lua @@ -25,18 +25,12 @@ import("core.project.project") -- init it function init(self) - - -- init arflags self:set("gcarflags", "grc") - - -- init the file formats - self:set("formats", { static = "$(name).a" }) end -- make the optimize flag function nf_optimize(self, level) - local maps = - { + local maps = { none = "-N" } return maps[level] @@ -44,15 +38,10 @@ end -- make the symbol flag function nf_symbol(self, level, target, mapkind) - - -- only for compiler if mapkind ~= "object" then return end - - -- the maps - local maps = - { + local maps = { debug = "-E" } return maps[level] @@ -60,8 +49,7 @@ end -- make the strip flag function nf_strip(self, level) - local maps = - { + local maps = { debug = "-s" , all = "-s" } diff --git a/xmake/rules/go/xmake.lua b/xmake/rules/go/xmake.lua index ef6f04321..58890e260 100644 --- a/xmake/rules/go/xmake.lua +++ b/xmake/rules/go/xmake.lua @@ -24,6 +24,10 @@ rule("go.build") on_load(function (target) -- we disable to build across targets in parallel, because the source files may depend on other target modules target:set("policy", "build.across_targets_in_parallel", false) + -- xxx.a + if target:is_static() then + target:set("prefixname", "") + end end) on_build_files("build.object") |
