File: BUILD.gn

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (96 lines) | stat: -rw-r--r-- 1,946 bytes parent folder | download | duplicates (7)
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
85
86
87
88
89
90
91
92
93
94
95
96
import("//compiler-rt/target.gni")

scudo_cflags = [
  "-Werror=conversion",
  "-nostdinc++",
]

source_set("sources") {
  configs -= [ "//llvm/utils/gn/build:llvm_code" ]
  configs += [ "//llvm/utils/gn/build:crt_code" ]
  cflags = scudo_cflags
  sources = [
    "allocator_config.h",
    "atomic_helpers.h",
    "bytemap.h",
    "checksum.cpp",
    "checksum.h",
    "chunk.h",
    "combined.h",
    "common.cpp",
    "common.h",
    "crc32_hw.cpp",
    "flags.cpp",
    "flags.h",
    "flags_parser.cpp",
    "flags_parser.h",
    "fuchsia.cpp",
    "fuchsia.h",
    "include/scudo/interface.h",
    "internal_defs.h",
    "linux.cpp",
    "linux.h",
    "list.h",
    "local_cache.h",
    "memtag.h",
    "mutex.h",
    "options.h",
    "platform.h",
    "primary32.h",
    "primary64.h",
    "quarantine.h",
    "release.cpp",
    "release.h",
    "report.cpp",
    "report.h",
    "secondary.h",
    "size_class_map.h",
    "stack_depot.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" ]
  cflags = scudo_cflags
  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" ]
  cflags = scudo_cflags
  sources = [ "wrappers_cpp.cpp" ]

  public_configs = [ ":scudo_config" ]
}

config("scudo_config") {
  include_dirs = [
    ".",
    "include",
  ]
  if (current_os == "android") {
    cflags = [ "-fno-emulated-tls" ]
  }
}