summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-27 14:51:26 +0800
committerruki <[email protected]>2017-02-27 14:51:26 +0800
commit65f49bd7b23dbbb2516b93518906f451cd35a7c0 (patch)
treee489db5c253bf021b7d3a58c899a8d5bc793592e
parent7d1939d7dcc6f18f5cef9a4d443e44cfa4bdefa5 (diff)
rename go tool kind to gc
-rw-r--r--xmake/core/tool/builder.lua2
-rw-r--r--xmake/core/tool/linker.lua4
-rwxr-xr-xxmake/languages/golang/xmake.lua8
-rw-r--r--xmake/platforms/linux/check.lua12
-rw-r--r--xmake/platforms/linux/load.lua2
-rw-r--r--xmake/platforms/macosx/check.lua12
-rw-r--r--xmake/platforms/macosx/load.lua2
-rw-r--r--xmake/platforms/windows/check.lua12
8 files changed, 27 insertions, 27 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua
index 9fdb76ce1..de562593b 100644
--- a/xmake/core/tool/builder.lua
+++ b/xmake/core/tool/builder.lua
@@ -158,7 +158,7 @@ function builder:_addflags_from_platform(flags)
-- add flags
local toolkind = self:get("kind")
for _, flagkind in ipairs(self:_flagkinds()) do
- -- attempt to add special lanugage flags first, .e.g go-ldflags, dc-arflags
+ -- attempt to add special lanugage flags first, .e.g gc-ldflags, dc-arflags
table.join2(flags, platform.get(toolkind .. 'flags') or platform.get(flagkind))
end
end
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua
index 04daaf6b1..96f54b863 100644
--- a/xmake/core/tool/linker.lua
+++ b/xmake/core/tool/linker.lua
@@ -52,7 +52,7 @@ function linker:_addflags_from_compiler(flags, sourcekinds)
local instance, errors = compiler.load(sourcekind)
if instance then
for _, flagkind in ipairs(self:_flagkinds()) do
- -- attempt to add special lanugage flags first, .e.g go-ldflags, dc-arflags
+ -- attempt to add special lanugage flags first, .e.g gc-ldflags, dc-arflags
table.join2(flags_of_compiler, instance:get(toolkind .. 'flags') or instance:get(flagkind))
end
end
@@ -69,7 +69,7 @@ function linker:_addflags_from_linker(flags)
local toolkind = self:get("kind")
for _, flagkind in ipairs(self:_flagkinds()) do
- -- attempt to add special lanugage flags first, .e.g go-ldflags, dc-arflags
+ -- attempt to add special lanugage flags first, .e.g gc-ldflags, dc-arflags
table.join2(flags, self:get(toolkind .. 'flags') or self:get(flagkind))
end
end
diff --git a/xmake/languages/golang/xmake.lua b/xmake/languages/golang/xmake.lua
index de2bedab0..dc1873f09 100755
--- a/xmake/languages/golang/xmake.lua
+++ b/xmake/languages/golang/xmake.lua
@@ -26,13 +26,13 @@
language("golang")
-- set source file kinds
- set_sourcekinds {go = ".go"}
+ set_sourcekinds {gc = ".go"}
-- set source file flags
- set_sourceflags {go = "gcflags"}
+ set_sourceflags {gc = "gcflags"}
-- set target kinds
- set_targetkinds {binary = "go-ld", static = "go-ar"}
+ set_targetkinds {binary = "gc-ld", static = "gc-ar"}
-- set target flags
set_targetflags {binary = "ldflags", static = "arflags"}
@@ -94,7 +94,7 @@ language("golang")
{
{ }
, {nil, "go", "kv", nil, "The Golang Compiler" }
- , {nil, "go-ld", "kv", nil, "The Golang Linker" }
+ , {nil, "gc-ld", "kv", nil, "The Golang Linker" }
, {nil, "go-ar", "kv", nil, "The Golang Static Library Linker" }
, { }
diff --git a/xmake/platforms/linux/check.lua b/xmake/platforms/linux/check.lua
index e7faa5154..cbe89854b 100644
--- a/xmake/platforms/linux/check.lua
+++ b/xmake/platforms/linux/check.lua
@@ -98,12 +98,12 @@ function _check_toolchains(config)
checker.check_toolchain(config, "as", cross, "gcc", "the assember")
-- check for golang tools
- checker.check_toolchain(config, "go", "", "go", "the golang compiler")
- checker.check_toolchain(config, "go", "", "gccgo", "the golang compiler")
- checker.check_toolchain(config, "go-ar", "", "go", "the golang static library archiver")
- checker.check_toolchain(config, "go-ar", "", "gccgo", "the golang static library archiver")
- checker.check_toolchain(config, "go-ld", "", "go", "the golang linker")
- checker.check_toolchain(config, "go-ld", "", "gccgo", "the golang linker")
+ checker.check_toolchain(config, "gc", "", "go", "the golang compiler")
+ checker.check_toolchain(config, "gc", "", "gccgo", "the golang compiler")
+ checker.check_toolchain(config, "gc-ar", "", "go", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ar", "", "gccgo", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ld", "", "go", "the golang linker")
+ checker.check_toolchain(config, "gc-ld", "", "gccgo", "the golang linker")
-- check for dlang tools
checker.check_toolchain(config, "dc", "", "dmd", "the dlang compiler")
diff --git a/xmake/platforms/linux/load.lua b/xmake/platforms/linux/load.lua
index 185b5c8a5..58b543114 100644
--- a/xmake/platforms/linux/load.lua
+++ b/xmake/platforms/linux/load.lua
@@ -71,7 +71,7 @@ function main()
_g.asflags = { archflags }
-- init flags for golang
- _g["go-ldflags"] = {}
+ _g["gc-ldflags"] = {}
-- init flags for dlang
local dc_archs = { i386 = "-m32", x86_64 = "-m64" }
diff --git a/xmake/platforms/macosx/check.lua b/xmake/platforms/macosx/check.lua
index 92af39162..f82f16dc4 100644
--- a/xmake/platforms/macosx/check.lua
+++ b/xmake/platforms/macosx/check.lua
@@ -55,12 +55,12 @@ function _check_toolchains(config)
checker.check_toolchain(config, "sc-sh", "xcrun -sdk macosx ", "swiftc", "the swift shared library linker")
-- check for golang tools
- checker.check_toolchain(config, "go", "", "go", "the golang compiler")
- checker.check_toolchain(config, "go", "", "gccgo", "the golang compiler")
- checker.check_toolchain(config, "go-ar", "", "go", "the golang static library archiver")
- checker.check_toolchain(config, "go-ar", "", "gccgo", "the golang static library archiver")
- checker.check_toolchain(config, "go-ld", "", "go", "the golang linker")
- checker.check_toolchain(config, "go-ld", "", "gccgo", "the golang linker")
+ checker.check_toolchain(config, "gc", "", "go", "the golang compiler")
+ checker.check_toolchain(config, "gc", "", "gccgo", "the golang compiler")
+ checker.check_toolchain(config, "gc-ar", "", "go", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ar", "", "gccgo", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ld", "", "go", "the golang linker")
+ checker.check_toolchain(config, "gc-ld", "", "gccgo", "the golang linker")
-- check for dlang tools
checker.check_toolchain(config, "dc", "", "dmd", "the dlang compiler")
diff --git a/xmake/platforms/macosx/load.lua b/xmake/platforms/macosx/load.lua
index 43a685870..ce6566daf 100644
--- a/xmake/platforms/macosx/load.lua
+++ b/xmake/platforms/macosx/load.lua
@@ -61,7 +61,7 @@ function main()
_g["sc-ldflags"] = { format("-target %s-apple-macosx%s", arch, target_minver) , "-sdk " .. xcode_sdkdir }
-- init flags for golang
- _g["go-ldflags"] = {}
+ _g["gc-ldflags"] = {}
-- init flags for dlang
local dc_archs = { i386 = "-m32", x86_64 = "-m64" }
diff --git a/xmake/platforms/windows/check.lua b/xmake/platforms/windows/check.lua
index 63c557cf2..152d3b226 100644
--- a/xmake/platforms/windows/check.lua
+++ b/xmake/platforms/windows/check.lua
@@ -206,12 +206,12 @@ function _check_toolchains(config)
environment.leave("toolchains")
-- check for golang tools
- checker.check_toolchain(config, "go", "", "go", "the golang compiler")
- checker.check_toolchain(config, "go", "", "gccgo", "the golang compiler")
- checker.check_toolchain(config, "go-ar", "", "go", "the golang static library archiver")
- checker.check_toolchain(config, "go-ar", "", "gccgo", "the golang static library archiver")
- checker.check_toolchain(config, "go-ld", "", "go", "the golang linker")
- checker.check_toolchain(config, "go-ld", "", "gccgo", "the golang linker")
+ checker.check_toolchain(config, "gc", "", "go", "the golang compiler")
+ checker.check_toolchain(config, "gc", "", "gccgo", "the golang compiler")
+ checker.check_toolchain(config, "gc-ar", "", "go", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ar", "", "gccgo", "the golang static library archiver")
+ checker.check_toolchain(config, "gc-ld", "", "go", "the golang linker")
+ checker.check_toolchain(config, "gc-ld", "", "gccgo", "the golang linker")
-- check for dlang tools
checker.check_toolchain(config, "dc", "", "dmd", "the dlang compiler")