aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-01 16:47:55 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-03-02 17:43:06 +0800
commitf972691eea59a631ac78a9cfc1170cfce615cc66 (patch)
tree9a062757d8aca95ea4d31a7b00defd6b608d90d0 /build
parent230cf2ec9142b6a8f421cb8873deb5df1566e89c (diff)
downloadgo-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar.gz
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar.bz2
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar.lz
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar.xz
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.tar.zst
go-tangerine-f972691eea59a631ac78a9cfc1170cfce615cc66.zip
travis: support building mips32 and mips64 too
Diffstat (limited to 'build')
-rw-r--r--build/ci.go41
1 files changed, 30 insertions, 11 deletions
diff --git a/build/ci.go b/build/ci.go
index d8c76567c..8b6d2d5e0 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -23,15 +23,15 @@ Usage: go run ci.go <command> <command flags/arguments>
Available commands are:
- install [-arch architecture] [ packages... ] -- builds packages and executables
- test [ -coverage ] [ -vet ] [ -misspell ] [ packages... ] -- runs the tests
- archive [-arch architecture] [ -type zip|tar ] [ -signer key-envvar ] [ -upload dest ] -- archives build artefacts
- importkeys -- imports signing keys from env
- debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
- nsis -- creates a Windows NSIS installer
- aar [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an Android archive
- xcode [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an iOS XCode framework
- xgo [ options ] -- cross builds according to options
+ install [ -arch architecture ] [ packages... ] -- builds packages and executables
+ test [ -coverage ] [ -vet ] [ -misspell ] [ packages... ] -- runs the tests
+ archive [ -arch architecture ] [ -type zip|tar ] [ -signer key-envvar ] [ -upload dest ] -- archives build artefacts
+ importkeys -- imports signing keys from env
+ debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
+ nsis -- creates a Windows NSIS installer
+ aar [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an Android archive
+ xcode [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an iOS XCode framework
+ xgo [ -alltools ] [ options ] -- cross builds according to options
For all commands, -n prevents execution of external programs (dry run mode).
@@ -917,6 +917,9 @@ func newPodMetadata(env build.Environment, archive string) podMetadata {
// Cross compilation
func doXgo(cmdline []string) {
+ var (
+ alltools = flag.Bool("alltools", false, `Flag whether we're building all known tools, or only on in particular`)
+ )
flag.CommandLine.Parse(cmdline)
env := build.Env()
@@ -924,8 +927,24 @@ func doXgo(cmdline []string) {
gogetxgo := goTool("get", "github.com/karalabe/xgo")
build.MustRun(gogetxgo)
- // Execute the actual cross compilation
- xgo := xgoTool(append(buildFlags(env), flag.Args()...))
+ // If all tools building is requested, build everything the builder wants
+ args := append(buildFlags(env), flag.Args()...)
+ args = append(args, []string{"--dest", GOBIN}...)
+
+ if *alltools {
+ for _, res := range allToolsArchiveFiles {
+ if strings.HasPrefix(res, GOBIN) {
+ // Binary tool found, cross build it explicitly
+ args = append(args, "./"+filepath.Join("cmd", filepath.Base(res)))
+ xgo := xgoTool(args)
+ build.MustRun(xgo)
+ args = args[:len(args)-1]
+ }
+ }
+ return
+ }
+ // Otherwise xxecute the explicit cross compilation
+ xgo := xgoTool(args)
build.MustRun(xgo)
}