Skip to content

Commit 612a0ba

Browse files
committed
Try using clang on Linux arm64
1 parent a59b930 commit 612a0ba

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.bazelci/presubmit.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ tasks:
5858
- "--test_output=errors"
5959
- "--cxxopt=-std=c++17"
6060
- "--host_cxxopt=-std=c++17"
61-
- "--copt=-march=armv8.3-a+pauth"
62-
- "--host_copt=-march=armv8.3-a+pauth"
61+
- "--repo_env=CC=clang"
6362
test_targets:
6463
- "//examples/routeguide:cpp_cpp"
6564
- "//examples/routeguide:cpp_csharp"
@@ -198,7 +197,7 @@ tasks:
198197
name: Buf
199198
platform: ubuntu2004_arm64
200199
environment:
201-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
200+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
202201
shell_commands:
203202
- set -x
204203
- make buf_buf_proto_breaking_test_example
@@ -240,7 +239,7 @@ tasks:
240239
name: C++
241240
platform: ubuntu2004_arm64
242241
environment:
243-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
242+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
244243
shell_commands:
245244
- set -x
246245
- make cpp_cpp_proto_compile_example
@@ -288,7 +287,7 @@ tasks:
288287
name: C#
289288
platform: ubuntu2004_arm64
290289
environment:
291-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
290+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
292291
shell_commands:
293292
- set -x
294293
- make csharp_csharp_proto_compile_example
@@ -337,7 +336,7 @@ tasks:
337336
name: Documentation
338337
platform: ubuntu2004_arm64
339338
environment:
340-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
339+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
341340
shell_commands:
342341
- set -x
343342
- make doc_doc_docbook_compile_example
@@ -388,7 +387,7 @@ tasks:
388387
name: Go
389388
platform: ubuntu2004_arm64
390389
environment:
391-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
390+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
392391
shell_commands:
393392
- set -x
394393
- make go_go_proto_compile_example
@@ -436,7 +435,7 @@ tasks:
436435
name: gRPC-Gateway
437436
platform: ubuntu2004_arm64
438437
environment:
439-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
438+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
440439
shell_commands:
441440
- set -x
442441
- make grpc_gateway_gateway_grpc_compile_example
@@ -484,7 +483,7 @@ tasks:
484483
name: Java
485484
platform: ubuntu2004_arm64
486485
environment:
487-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
486+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
488487
shell_commands:
489488
- set -x
490489
- make java_java_proto_compile_example
@@ -532,7 +531,7 @@ tasks:
532531
name: JavaScript
533532
platform: ubuntu2004_arm64
534533
environment:
535-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
534+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
536535
shell_commands:
537536
- set -x
538537
- make js_js_proto_compile_example
@@ -574,7 +573,7 @@ tasks:
574573
name: Python
575574
platform: ubuntu2004_arm64
576575
environment:
577-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
576+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
578577
shell_commands:
579578
- set -x
580579
- make python_python_proto_compile_example
@@ -628,7 +627,7 @@ tasks:
628627
name: Scala
629628
platform: ubuntu2004_arm64
630629
environment:
631-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
630+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
632631
shell_commands:
633632
- set -x
634633
- make scala_scala_proto_compile_example
@@ -718,7 +717,7 @@ tasks:
718717
name: Test Workspaces
719718
platform: ubuntu2004_arm64
720719
environment:
721-
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --copt=-march=armv8.3-a+pauth --host_copt=-march=armv8.3-a+pauth"
720+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --repo_env=CC=clang"
722721
shell_commands:
723722
- set -x
724723
- make test_workspace_absolute_strip_import_prefix

tools/rulegen/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ var extraPlatformFlags = map[string][]string{
3232
"ubuntu2004_arm64": []string{
3333
// Required for absl to build correctly and avoid
3434
// "Error: selected processor does not support `xpaclri'"
35-
"--copt=-march=armv8.3-a+pauth",
36-
"--host_copt=-march=armv8.3-a+pauth",
35+
"--repo_env=CC=clang",
3736
},
3837
"windows": []string{
3938
"--define=protobuf_allow_msvc=true", // https://github.com/protocolbuffers/protobuf/issues/20085

0 commit comments

Comments
 (0)