From 75e50892c0702edcfcc0ddfc8fe4e01386b3ce65 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Thu, 2 Sep 2021 13:07:54 +0800 Subject: Fix -Wframe-larger-than warnings in ART tests -Wno-frame-larger-than has to be duplicated for android and host to make sure it comes after the -Wframe-larger-than warnings inserted by art.go target-specific properties. This workaround was found in build/Android.bp, it is also required for all the other test targets. Test: build Bug: 197230471 Change-Id: I2caa46f4a46e1634b958f0e2be1bb7175cc3e006 --- benchmark/Android.bp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'benchmark/Android.bp') diff --git a/benchmark/Android.bp b/benchmark/Android.bp index da6b9e5843..342fae89fd 100644 --- a/benchmark/Android.bp +++ b/benchmark/Android.bp @@ -34,9 +34,17 @@ art_cc_library { "micro-native/micro_native.cc", "scoped-primitive-array/scoped_primitive_array.cc", ], - cflags: [ - "-Wno-frame-larger-than=", - ], + target: { + // This has to be duplicated for android and host to make sure it + // comes after the -Wframe-larger-than warnings inserted by art.go + // target-specific properties + android: { + cflags: ["-Wno-frame-larger-than="], + }, + host: { + cflags: ["-Wno-frame-larger-than="], + }, + }, header_libs: [ "libnativehelper_header_only", ], @@ -65,7 +73,15 @@ art_cc_library { ], header_libs: ["jni_headers"], stl: "libc++_static", - cflags: [ - "-Wno-frame-larger-than=", - ], + target: { + // This has to be duplicated for android and host to make sure it + // comes after the -Wframe-larger-than warnings inserted by art.go + // target-specific properties + android: { + cflags: ["-Wno-frame-larger-than="], + }, + host: { + cflags: ["-Wno-frame-larger-than="], + }, + }, } -- cgit v1.2.3-59-g8ed1b