From cabc68a5de13219ec144d91c14d2619cd75537b7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 18 Oct 2022 09:37:57 -0400 Subject: [PATCH] Disable shorten 64 to 32 error for arm64 (do not make it fatal) (#23237) * Disable shorten 64 to 32 error for arm64 (do not make it fatal) * Add a CI target that would catch these errors in future updates * Restyle * Fix typo and link to the pigweed update PR --- .github/workflows/examples-linux-arm.yaml | 1 + build/config/compiler/BUILD.gn | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 2027f4be83a53d..b8b47b379a97aa 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -73,6 +73,7 @@ jobs: --target linux-arm64-chip-tool-ipv6only-clang \ --target linux-arm64-lock-clang \ --target linux-arm64-minmdns-clang \ + --target linux-arm64-light-rpc-ipv6only-clang \ --target linux-arm64-thermostat-no-ble-clang \ build \ " diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 0e2e93d9d1892d..c6c16334c8b2bc 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -260,6 +260,15 @@ config("strict_warnings") { "-Wshorten-64-to-32", "-Wformat-type-confusion", ] + + # TODO: can make this back fatal in once pigweed updates can be taken again. + # See https://github.com/project-chip/connectedhomeip/pull/22079 + # + # Currently `./scripts/build/build_examples.py --target linux-arm64-light-rpc-ipv6only-clang build` + # fails in third_party/pigweed/repo/pw_protobuf + if (current_cpu == "arm64" && current_os == "linux") { + cflags += [ "-Wno-error=shorten-64-to-32" ] + } } if (!is_asan && (current_os == "linux" || current_os == "android")) {