mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
all: fix integration test on macOS
Newer protobuf versions won't build on macOS unless you pass --macos_minimum_os=(something recentish) to bazel. Change-Id: I9e8f47eae708023400e15e5ca43d79caf2f62825 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/569355 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
This commit is contained in:
parent
fe89159266
commit
235ef28b75
@ -283,14 +283,24 @@ func mustInitDeps(t *testing.T) {
|
||||
// the conformance test runner.
|
||||
fmt.Printf("build %v\n", filepath.Base(protobufPath))
|
||||
env := os.Environ()
|
||||
args := []string{
|
||||
"bazel", "build",
|
||||
":protoc",
|
||||
"//conformance:conformance_test_runner",
|
||||
}
|
||||
if runtime.GOOS == "darwin" {
|
||||
// Adding this environment variable appears to be necessary for macOS builds.
|
||||
env = append(env, "CC=clang")
|
||||
// And this flag.
|
||||
args = append(args,
|
||||
"--macos_minimum_os=13.0",
|
||||
"--host_macos_minimum_os=13.0",
|
||||
)
|
||||
}
|
||||
command{
|
||||
Dir: protobufPath,
|
||||
Env: env,
|
||||
}.mustRun(t, "bazel", "build", ":protoc", "//conformance:conformance_test_runner")
|
||||
}.mustRun(t, args...)
|
||||
}
|
||||
}
|
||||
check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos
|
||||
|
Loading…
Reference in New Issue
Block a user