From 11805112e48d76140042083c7b9a0eebfee5e804 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 5ad03f7c5cb03a..938d2d7e405835 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -259,6 +259,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")) {