From ee989fcb4dbb903985766f1aff2667575a446e43 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Fri, 18 Sep 2020 16:35:06 +0900 Subject: [PATCH] Turn off -Wnon-virtual-dtor explicitly adb has been built without -Wnon-virtual-dtor because Soong doesn't turn the flag for the host targets, and the flag can't coexist with -Wexit-time-destructors. However, the new host target linux_bionic_arm64 turns the flag on, because it inherits most of the cflags from the device config. That is forcing us to implement the virtual destructor, which isn't possible due to -Wexit-time-destructors. Solving the issue by explicitly turning -Wnon-virtual-dtor off so that it is disabled also for the linux_bionic_arm64 target. Bug: 159685774 Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m \ out/soong/host/linux_bionic-arm64/bin/adb Test: run the adb on an ARM emulator Change-Id: I655b340e4f199a3a75b7df7cc3fe18832e26a7ae --- adb/Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/adb/Android.bp b/adb/Android.bp index df2c0f965..5c1e1feca 100644 --- a/adb/Android.bp +++ b/adb/Android.bp @@ -25,6 +25,7 @@ cc_defaults { "-Wextra", "-Werror", "-Wexit-time-destructors", + "-Wno-non-virtual-dtor", "-Wno-unused-parameter", "-Wno-missing-field-initializers", "-Wthread-safety",