summaryrefslogtreecommitdiff
path: root/chromium/third_party/android_ndk/BUILD.gn
blob: 86691d42f97f2a729fc34aec532cc9aadcd83dbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("cpu_features_include") {
  include_dirs = [ "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 = [
    "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",
  ]
}