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>
tg.setenv("PKG_CONFIG_PATH", tg.path("."))
tg.run("run", tg.path("foo.go"))
- // test for ldflags
- tg.tempFile("bar.pc", `
+ if runtime.GOOS != "darwin" { // darwin doesn't like these ldflags
+ // test for ldflags
+ tg.tempFile("bar.pc", `
Name: bar
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