Debian Codegraph @

llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/BUILD.gn

raw
1 import("//compiler-rt/target.gni")
2
3 scudo_cflags = [
4 "-Werror=conversion",
5 "-nostdinc++",
6 ]
7
8 source_set("sources") {
9 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
10 configs += [ "//llvm/utils/gn/build:crt_code" ]
11 cflags = scudo_cflags
12 sources = [
13 "allocator_common.h",
14 "allocator_config.h",
15 "allocator_config_wrapper.h",
16 "atomic_helpers.h",
17 "bytemap.h",
18 "checksum.cpp",
19 "checksum.h",
20 "chunk.h",
21 "combined.h",
22 "common.cpp",
23 "common.h",
24 "condition_variable.h",
25 "condition_variable_base.h",
26 "condition_variable_linux.cpp",
27 "condition_variable_linux.h",
28 "crc32_hw.cpp",
29 "flags.cpp",
30 "flags.h",
31 "flags_parser.cpp",
32 "flags_parser.h",
33 "fuchsia.cpp",
34 "fuchsia.h",
35 "include/scudo/interface.h",
36 "internal_defs.h",
37 "linux.cpp",
38 "linux.h",
39 "list.h",
40 "local_cache.h",
41 "mem_map.cpp",
42 "mem_map.h",
43 "mem_map_base.h",
44 "mem_map_fuchsia.cpp",
45 "mem_map_fuchsia.h",
46 "mem_map_linux.cpp",
47 "mem_map_linux.h",
48 "memtag.h",
49 "mutex.h",
50 "options.h",
51 "platform.h",
52 "primary32.h",
53 "primary64.h",
54 "quarantine.h",
55 "release.cpp",
56 "release.h",
57 "report.cpp",
58 "report.h",
59 "report_linux.cpp",
60 "report_linux.h",
61 "secondary.h",
62 "size_class_map.h",
63 "stack_depot.h",
64 "stats.h",
65 "string_utils.cpp",
66 "string_utils.h",
67 "timing.cpp",
68 "timing.h",
69 "tsd.h",
70 "tsd_exclusive.h",
71 "tsd_shared.h",
72 "vector.h",
73 "wrappers_c.h",
74 "wrappers_c_checks.h",
75 ]
76
77 if (current_cpu == "arm" || current_cpu == "arm64") {
78 cflags += [ "-mcrc" ]
79 }
80 if (current_cpu == "x64") {
81 cflags += [ "-msse4.2" ]
82 }
83
84 public_configs = [ ":scudo_config" ]
85 }
86
87 source_set("c_wrapper_sources") {
88 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
89 configs += [ "//llvm/utils/gn/build:crt_code" ]
90 cflags = scudo_cflags
91 sources = [ "wrappers_c.cpp" ]
92
93 public_configs = [ ":scudo_config" ]
94 }
95
96 source_set("cxx_wrapper_sources") {
97 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
98 configs += [ "//llvm/utils/gn/build:crt_code" ]
99 cflags = scudo_cflags
100 sources = [ "wrappers_cpp.cpp" ]
101
102 public_configs = [ ":scudo_config" ]
103 }
104
105 config("scudo_config") {
106 include_dirs = [
107 ".",
108 "include",
109 ]
110 if (current_os == "android") {
111 cflags = [ "-fno-emulated-tls" ]
112 }
113 }