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
This commit is contained in:
Jiyong Park 2020-09-18 16:35:06 +09:00
parent 978faa37ba
commit ee989fcb4d
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ cc_defaults {
"-Wextra", "-Wextra",
"-Werror", "-Werror",
"-Wexit-time-destructors", "-Wexit-time-destructors",
"-Wno-non-virtual-dtor",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-missing-field-initializers", "-Wno-missing-field-initializers",
"-Wthread-safety", "-Wthread-safety",