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 "mem_map.cpp",
41 "mem_map.h",
42 "mem_map_base.h",
43 "mem_map_fuchsia.cpp",
44 "mem_map_fuchsia.h",
45 "mem_map_linux.cpp",
46 "mem_map_linux.h",
47 "memtag.h",
48 "mutex.h",
49 "options.h",
50 "platform.h",
51 "primary32.h",
52 "primary64.h",
53 "quarantine.h",
54 "release.cpp",
55 "release.h",
56 "report.cpp",
57 "report.h",
58 "report_linux.cpp",
59 "report_linux.h",
60 "secondary.h",
61 "size_class_allocator.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 "type_traits.h",
73 "vector.h",
74 "wrappers_c.h",
75 "wrappers_c_checks.h",
76 ]
77
78 if (current_cpu == "arm" || current_cpu == "arm64") {
79 cflags += [ "-mcrc" ]
80 }
81 if (current_cpu == "x64") {
82 cflags += [ "-msse4.2" ]
83 }
84
85 public_configs = [ ":scudo_config" ]
86 }
87
88 source_set("c_wrapper_sources") {
89 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
90 configs += [ "//llvm/utils/gn/build:crt_code" ]
91 cflags = scudo_cflags
92 sources = [ "wrappers_c.cpp" ]
93
94 public_configs = [ ":scudo_config" ]
95 }
96
97 source_set("cxx_wrapper_sources") {
98 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
99 configs += [ "//llvm/utils/gn/build:crt_code" ]
100 cflags = scudo_cflags
101 sources = [ "wrappers_cpp.cpp" ]
102
103 public_configs = [ ":scudo_config" ]
104 }
105
106 config("scudo_config") {
107 include_dirs = [
108 ".",
109 "include",
110 ]
111 if (current_os == "android") {
112 cflags = [ "-fno-emulated-tls" ]
113 }
114 }