From 8a5405fc40de78a69c7513a7f83cd9883729d28b Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Wed, 24 Oct 2018 18:39:36 +0000 Subject: [PATCH] [build] Add //third_party/android_tools BUILD file needed by zlib Change-Id: I4f641bcc4940ab508f38b32397455f996659784b Reviewed-on: https://dart-review.googlesource.com/c/81363 Commit-Queue: Vyacheslav Egorov Commit-Queue: Zach Anderson Auto-Submit: Vyacheslav Egorov Reviewed-by: Zach Anderson --- .../third_party/android_tools/BUILD.gn | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 build/secondary/third_party/android_tools/BUILD.gn diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn new file mode 100644 index 00000000000..5f803c954c6 --- /dev/null +++ b/build/secondary/third_party/android_tools/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright 2018 The Dart project Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/config.gni") + +config("cpu_features_include") { + include_dirs = [ "$android_ndk_root/sources/android/cpufeatures" ] +} + +config("cpu_features_warnings") { + if (is_clang) { + # cpu-features.c has few unused functions on x86 b/26403333 + cflags = [ "-Wno-unused-function" ] + } +} + +source_set("cpu_features") { + sources = [ + "$android_ndk_root/sources/android/cpufeatures/cpu-features.c", + ] + public_configs = [ ":cpu_features_include" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + # Must be after no_chromium_code for warning flags to be ordered correctly. + ":cpu_features_warnings", + ] +}