• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/android/rules.gni")
6
7config("cpu_features_include") {
8  include_dirs = [ "$android_ndk_root/sources/android/cpufeatures" ]
9}
10
11config("cpu_features_warnings") {
12  if (is_clang) {
13    # cpu-features.c has few unused functions on x86 b/26403333
14    cflags = [ "-Wno-unused-function" ]
15  }
16}
17
18source_set("cpu_features") {
19  sources = [ "$android_ndk_root/sources/android/cpufeatures/cpu-features.c" ]
20  public_configs = [ ":cpu_features_include" ]
21
22  configs -= [ "//build/config/compiler:chromium_code" ]
23  configs += [
24    "//build/config/compiler:no_chromium_code",
25
26    # Must be after no_chromium_code for warning flags to be ordered correctly.
27    ":cpu_features_warnings",
28  ]
29}
30