From a2bc585afe907e4dc81334708282918001d14c4e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 6 Sep 2019 14:25:28 -0700 Subject: [PATCH] Fix compiling binaries with go 1.13 The go compile command in go 1.13 needs -p main instead of -p $pkgPath when compiling binaries. This also works for older go releases. Also turn on travis for go 1.13. Change-Id: I45ce185aa44cfa01a7933cc6e52290a85c851641 --- .travis.yml | 1 + bootstrap/bootstrap.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c39ad38..706e469 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ go: - "1.10" - "1.11" - "1.12" + - "1.13" cache: directories: diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 3464c0b..1799e68 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -437,7 +437,7 @@ func (g *goBinary) GenerateBuildActions(ctx blueprint.ModuleContext) { name, srcs, genSrcs, testSrcs) } - buildGoPackage(ctx, objDir, name, archiveFile, srcs, genSrcs) + buildGoPackage(ctx, objDir, "main", archiveFile, srcs, genSrcs) var linkDeps []string var libDirFlags []string