summaryrefslogtreecommitdiffstats
path: root/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/BUILD.gn
blob: 245ba18643abe337fa04a351e81215514c7e3410 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import("//compiler-rt/target.gni")

source_set("sources") {
  configs -= [ "//llvm/utils/gn/build:llvm_code" ]
  configs += [ "//llvm/utils/gn/build:crt_code" ]
  sources = [
    "allocator_config.h",
    "atomic_helpers.h",
    "bytemap.h",
    "checksum.cpp",
    "checksum.h",
    "chunk.h",
    "combined.h",
    "common.cpp",
    "crc32_hw.cpp",
    "flags.cpp",
    "flags.h",
    "flags_parser.cpp",
    "flags_parser.h",
    "fuchsia.cpp",
    "fuchsia.h",
    "interface.h",
    "internal_defs.h",
    "linux.cpp",
    "linux.h",
    "list.h",
    "local_cache.h",
    "mutex.h",
    "platform.h",
    "primary32.h",
    "primary64.h",
    "quarantine.h",
    "release.h",
    "report.cpp",
    "report.h",
    "secondary.h",
    "size_class_map.h",
    "stats.h",
    "string_utils.cpp",
    "string_utils.h",
    "tsd.h",
    "tsd_exclusive.h",
    "tsd_shared.h",
    "vector.h",
    "wrappers_c.h",
    "wrappers_c_checks.h",
  ]

  if (current_cpu == "arm" || current_cpu == "arm64") {
    cflags = [ "-mcrc" ]
  }
  if (current_cpu == "x64") {
    cflags = [ "-msse4.2" ]
  }

  public_configs = [ ":scudo_config" ]
}

source_set("c_wrapper_sources") {
  configs -= [ "//llvm/utils/gn/build:llvm_code" ]
  configs += [ "//llvm/utils/gn/build:crt_code" ]
  sources = [
    "wrappers_c.cpp",
  ]

  public_configs = [ ":scudo_config" ]
}

source_set("cxx_wrapper_sources") {
  configs -= [ "//llvm/utils/gn/build:llvm_code" ]
  configs += [ "//llvm/utils/gn/build:crt_code" ]
  sources = [
    "wrappers_cpp.cpp",
  ]

  public_configs = [ ":scudo_config" ]
}

config("scudo_config") {
  include_dirs = [ "//compiler-rt/lib/scudo/standalone" ]
  if (current_os == "android") {
    cflags = [ "-fno-emulated-tls" ]
  }
}
OpenPOWER on IntegriCloud