Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #48 from schibsted/go1.16
Browse files Browse the repository at this point in the history
Fixes to run with go 1.16.
  • Loading branch information
perj authored Feb 8, 2021
2 parents d938f4a + ff88794 commit d66106c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/gobuild/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func buildCArchive(mode string, ldflags []string) {

if mode == "piclib" {
// -a to build standard libs with -shared
executeWithLdFlagsAndPkg(ldflags, "go", "build", "-i", "-pkgdir", abspkgdir+"/gopkg_piclib", "-installsuffix=piclib", "-buildmode=c-archive", "-gcflags=-shared", "-asmflags=-shared", "-a", "-o", absout)
executeWithLdFlagsAndPkg(ldflags, "go", "build", "-pkgdir", abspkgdir+"/gopkg_piclib", "-installsuffix=piclib", "-buildmode=c-archive", "-gcflags=-shared", "-asmflags=-shared", "-a", "-o", absout)
} else {
executeWithLdFlagsAndPkg(ldflags, "go", "build", "-i", "-pkgdir", abspkgdir+"/gopkg_lib", "-installsuffix=lib", "-buildmode=c-archive", "-o", absout)
executeWithLdFlagsAndPkg(ldflags, "go", "build", "-pkgdir", abspkgdir+"/gopkg_lib", "-installsuffix=lib", "-buildmode=c-archive", "-o", absout)
}

// If there weren't any exports the header won't be created, but we expect it to be there.
Expand Down
4 changes: 2 additions & 2 deletions test/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2018 Schibsted

set -xe
test -z "$BUILDPATH" && BUILDPATH=build
export BUILDPATH=build

CC="cc -std=gnu11" seb -condition cfoo -condition cbar
touch Builddesc # to make ninja invoke seb.
Expand All @@ -17,7 +17,7 @@ grep -q bar $BUILDPATH/obj/regress/lib/test
grep -q fooval $BUILDPATH/regress/regress/infile/infile

# Check regress flavor for darwin 386 build
grep -q rt0_386_darwin $BUILDPATH/regress/bin/goarch
grep -q rt0_386_openbsd $BUILDPATH/regress/bin/goarch
# Check prod flavor is executable.
$BUILDPATH/prod/bin/goarch

Expand Down
2 changes: 1 addition & 1 deletion test/goarch/Builddesc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GOPROG(goarch
goarch:regress[386]
goos:regress[darwin]
goos:regress[openbsd]
)

GOTEST(goarch
Expand Down

0 comments on commit d66106c

Please sign in to comment.