From 654eb2ad0492d47fc854180b10a366fc17c9203c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 8 Nov 2019 13:08:36 -0800 Subject: [PATCH] [SkQP/Android] Replace -Weverything with -Wextra -Weverything is not recommended, use -Wextra. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP Bug: b/143713277 Test: mma Change-Id: Ibaca86bd52348d544a8109b25ae013001444935d Reviewd-on: https://android-review.googlesource.com/1163299 Cherry-pick: 29cd4eca88df5fafde51ee9a50e3deb96263fc64 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253956 Reviewed-by: Derek Sollenberger Commit-Queue: Hal Canary --- BUILD.gn | 16 +++++++++++++--- tools/skqp/gn_to_bp.py | 3 +++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 843f9b9ae4..349ac1fb74 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2015,7 +2015,13 @@ if (skia_enable_tools) { } if (!is_win) { - test_lib("skqp_lib") { + source_set("skqp_lib") { + check_includes = false + testonly = true + if (!is_official_build) { + configs -= [ "//gn:warnings" ] + } + public_configs = [ ":skia_private" ] defines = [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ] sources = [ @@ -2053,8 +2059,12 @@ if (skia_enable_tools) { } } if (is_android) { - test_app("skqp_app") { - is_shared_library = true + shared_library("libskqp_app") { + configs += [ ":skia_private" ] + if (!is_official_build) { + configs -= [ "//gn:warnings" ] + } + testonly = true sources = [ "tools/skqp/src/jni_skqp.cpp", ] diff --git a/tools/skqp/gn_to_bp.py b/tools/skqp/gn_to_bp.py index 8fd614a070..99b022c567 100755 --- a/tools/skqp/gn_to_bp.py +++ b/tools/skqp/gn_to_bp.py @@ -149,6 +149,9 @@ defines = {str(d) for d in js['targets']['//:libskqp_app']['defines']} defines.update(["SK_ENABLE_DUMP_GPU", "SK_BUILD_FOR_SKQP"]) cflags_cc.update(['-Wno-extra-semi-stmt']) +# Android does not want -Weverything set, it blocks toolchain updates. +assert '-Weverything' not in cflags + gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'sources', srcs, None) gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'include_dirs', local_includes, 'freetype')