mirror of
https://github.com/golang/go
synced 2024-11-25 11:48:04 -07:00
cmd/go: adjust test with tricky ld flags to not run on Darwin
normally this would not run on darwin anyway, but if there happens to be a "pkg-config" binary, then it will. Darwin's clang/linker does not have this flag. Change-Id: I61929cf193c95b420441187beb8b237fa1037807 Reviewed-on: https://go-review.googlesource.com/c/go/+/616376 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
d39bfafee7
commit
2f507985dc
@ -1505,6 +1505,7 @@ func main() {
|
||||
tg.setenv("PKG_CONFIG_PATH", tg.path("."))
|
||||
tg.run("run", tg.path("foo.go"))
|
||||
|
||||
if runtime.GOOS != "darwin" { // darwin doesn't like these ldflags
|
||||
// test for ldflags
|
||||
tg.tempFile("bar.pc", `
|
||||
Name: bar
|
||||
@ -1512,6 +1513,8 @@ Description: The bar library
|
||||
Version: 1.0.0
|
||||
Libs: -Wl,-rpath=/path\ with\ spaces/bin
|
||||
`)
|
||||
}
|
||||
|
||||
tg.tempFile("bar.go", `package main
|
||||
/*
|
||||
#cgo pkg-config: bar
|
||||
|
Loading…
Reference in New Issue
Block a user