xref: /aosp_15_r20/external/cronet/base/third_party/dynamic_annotations/BUILD.gn (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2013 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5if (is_nacl) {
6  # Native client doesn't need dynamic annotations, so we provide a
7  # dummy target in order for clients to not have to special-case the
8  # dependency.
9  source_set("dynamic_annotations") {
10    sources = [ "dynamic_annotations.h" ]
11  }
12} else {
13  # Should be static library, see documentation on //base:base for discussion.
14  static_library("dynamic_annotations") {
15    sources = [
16      "../valgrind/valgrind.h",
17      "dynamic_annotations.c",
18      "dynamic_annotations.h",
19    ]
20    if (is_android && !is_debug) {
21      configs -= [ "//build/config/compiler:default_optimization" ]
22      configs += [ "//build/config/compiler:optimize_max" ]
23    }
24    configs -= [ "//build/config/compiler:chromium_code" ]
25    configs += [ "//build/config/compiler:no_chromium_code" ]
26  }
27}
28