blob: 149757c3efa22f8eed2f1a415465fe7b62872c12 [file] [log] [blame]
Elliott Hughes77c3ff82017-09-08 17:11:00 -07001//
2// Copyright (C) 2006 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17cc_binary {
18
19 srcs: [
20 "access.c",
21 "affinity.c",
22 "aio.c",
23 "basic_filters.c",
24 "bind.c",
25 "bjm.c",
26 "block.c",
27 "bpf.c",
28 "bpf_filter.c",
29 "bpf_seccomp_filter.c",
30 "bpf_sock_filter.c",
31 "btrfs.c",
32 "cacheflush.c",
33 "capability.c",
34 "chdir.c",
35 "chmod.c",
36 "clone.c",
37 "copy_file_range.c",
38 "count.c",
Elliott Hughes28e98bc2018-06-14 16:59:04 -070039 "delay.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -070040 "desc.c",
41 "dirent.c",
42 "dirent64.c",
43 "dm.c",
44 "dyxlat.c",
45 "epoll.c",
46 "error_prints.c",
47 "evdev.c",
Elliott Hughes28e98bc2018-06-14 16:59:04 -070048 "evdev_mpers.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -070049 "eventfd.c",
50 "execve.c",
51 "fadvise.c",
52 "fallocate.c",
53 "fanotify.c",
54 "fchownat.c",
55 "fcntl.c",
56 "fetch_bpf_fprog.c",
Elliott Hughesb7556142018-02-20 17:03:16 -080057 "fetch_indirect_syscall_args.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -070058 "fetch_struct_flock.c",
59 "fetch_struct_keyctl_kdf_params.c",
60 "fetch_struct_mmsghdr.c",
61 "fetch_struct_msghdr.c",
62 "fetch_struct_stat.c",
63 "fetch_struct_stat64.c",
64 "fetch_struct_statfs.c",
65 "file_handle.c",
66 "file_ioctl.c",
67 "filter_qualify.c",
68 "flock.c",
69 "fstatfs.c",
70 "fstatfs64.c",
71 "fs_x_ioctl.c",
72 "futex.c",
73 "getcpu.c",
74 "getcwd.c",
Elliott Hughesb7556142018-02-20 17:03:16 -080075 "getpagesize.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -070076 "getrandom.c",
77 "get_robust_list.c",
78 "hdio.c",
79 "hostname.c",
80 "inotify.c",
81 "io.c",
82 "ioctl.c",
83 "ioperm.c",
84 "iopl.c",
85 "ioprio.c",
86 "ipc.c",
87 "ipc_msg.c",
88 "ipc_msgctl.c",
89 "ipc_sem.c",
90 "ipc_shm.c",
91 "ipc_shmctl.c",
92 "kcmp.c",
93 "kexec.c",
94 "keyctl.c",
Elliott Hughesb7556142018-02-20 17:03:16 -080095 "kvm.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -070096 "ldt.c",
97 "link.c",
98 "listen.c",
99 "lookup_dcookie.c",
100 "loop.c",
101 "lseek.c",
102 "mem.c",
103 "membarrier.c",
104 "memfd_create.c",
105 "mknod.c",
Elliott Hughes28e98bc2018-06-14 16:59:04 -0700106 "mmap_cache.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -0700107 "mmsghdr.c",
108 "mount.c",
109 "mq.c",
110 "msghdr.c",
111 "mtd.c",
112 "net.c",
113 "netlink.c",
114 "netlink_crypto.c",
115 "netlink_inet_diag.c",
Elliott Hughes28e98bc2018-06-14 16:59:04 -0700116 "netlink_netfilter.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -0700117 "netlink_netlink_diag.c",
118 "netlink_packet_diag.c",
119 "netlink_route.c",
120 "netlink_selinux.c",
121 "netlink_smc_diag.c",
122 "netlink_sock_diag.c",
123 "netlink_unix_diag.c",
124 "nlattr.c",
125 "nsfs.c",
126 "numa.c",
127 "number_set.c",
128 "oldstat.c",
129 "open.c",
130 "pathtrace.c",
131 "perf.c",
132 "personality.c",
133 "pkeys.c",
134 "poll.c",
135 "prctl.c",
136 "print_dev_t.c",
137 "print_group_req.c",
138 "print_ifindex.c",
139 "print_mq_attr.c",
140 "print_msgbuf.c",
141 "print_sigevent.c",
142 "print_sg_req_info.c",
143 "print_statfs.c",
144 "print_struct_stat.c",
145 "print_time.c",
146 "print_timespec.c",
147 "print_timeval.c",
148 "print_timex.c",
149 "printmode.c",
150 "printrusage.c",
151 "printsiginfo.c",
152 "process.c",
153 "process_vm.c",
154 "ptp.c",
155 "quota.c",
156 "readahead.c",
157 "readlink.c",
158 "reboot.c",
159 "renameat.c",
160 "resource.c",
Elliott Hughes28e98bc2018-06-14 16:59:04 -0700161 "retval.c",
Elliott Hughes77c3ff82017-09-08 17:11:00 -0700162 "rtc.c",
163 "rtnl_addr.c",
164 "rtnl_addrlabel.c",
165 "rtnl_dcb.c",
166 "rtnl_link.c",
167 "rtnl_mdb.c",
168 "rtnl_neigh.c",
169 "rtnl_neightbl.c",
170 "rtnl_netconf.c",
171 "rtnl_nsid.c",
172 "rtnl_route.c",
173 "rtnl_rule.c",
174 "rtnl_tc.c",
175 "rtnl_tc_action.c",
176 "rt_sigframe.c",
177 "rt_sigreturn.c",
178 "sched.c",
179 "scsi.c",
180 "seccomp.c",
181 "sendfile.c",
182 "sg_io_v3.c",
183 "sg_io_v4.c",
184 "shutdown.c",
185 "sigaltstack.c",
186 "signal.c",
187 "signalfd.c",
188 "sigreturn.c",
189 "sock.c",
190 "sockaddr.c",
191 "socketcall.c",
192 "socketutils.c",
193 "sram_alloc.c",
194 "stat.c",
195 "stat64.c",
196 "statfs.c",
197 "statfs64.c",
198 "statx.c",
199 "strace.c",
200 "string_to_uint.c",
201 "swapon.c",
202 "sync_file_range.c",
203 "sync_file_range2.c",
204 "syscall.c",
205 "sysctl.c",
206 "sysinfo.c",
207 "syslog.c",
208 "sysmips.c",
209 "term.c",
210 "time.c",
211 "times.c",
212 "truncate.c",
213 "ubi.c",
214 "ucopy.c",
215 "uid16.c",
216 "uid.c",
217 "umask.c",
218 "umount.c",
219 "uname.c",
220 "upeek.c",
221 "upoke.c",
222 "userfaultfd.c",
223 "ustat.c",
224 "util.c",
225 "utime.c",
226 "utimes.c",
227 "v4l2.c",
228 "wait.c",
229 "xattr.c",
230 "xlat.c",
231 "xmalloc.c",
232 ],
233
234 // We have "config.h", but since we're using one file for both LP32 and LP64,
235 // we need to set the hard-coded size #defines here instead.
236 cflags: ["-DHAVE_CONFIG_H"] + [
237 "-DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG",
238 "-DSIZEOF_OFF_T=SIZEOF_LONG",
239 ] + [
240 "-Wall",
241 "-Werror",
242 "-Wno-missing-field-initializers",
243 "-Wno-pointer-arith",
244 "-Wno-unused-parameter",
245 "-Wno-sign-compare",
246 "-fno-strict-aliasing",
247 ],
248 multilib: {
249 lib32: {
250 cflags: [
251 "-DSIZEOF_LONG_LONG=8",
252 "-DSIZEOF_LONG=4",
253 "-DSIZEOF_RLIM_T=4",
254 "-DHAVE_STRUCT_STAT64=1",
255 ],
256 },
257 lib64: {
258 cflags: [
259 "-DSIZEOF_LONG_LONG=8",
260 "-DSIZEOF_LONG=8",
261 "-DSIZEOF_RLIM_T=8",
262 ],
263 },
264 },
265
266 arch: {
267 arm: {
268 cflags: ["-DARM=1"] + ["-DHAVE_STRUCT___OLD_KERNEL_STAT=1"],
269
270 local_include_dirs: [
271 "linux/arm",
272 "linux",
273 ],
274 },
275 arm64: {
276 cflags: ["-DAARCH64=1"],
277
278 local_include_dirs: [
279 "linux/aarch64",
280 "linux",
281 ],
282 },
283 mips: {
284 enabled: false,
285 },
286 mips64: {
287 enabled: false,
288 },
289 x86: {
290 cflags: ["-DI386=1"] + ["-DHAVE_STRUCT___OLD_KERNEL_STAT=1"],
291
292 local_include_dirs: [
293 "linux/i386",
294 "linux",
295 ],
296 },
297 x86_64: {
298 cflags: ["-DX86_64=1"],
299
300 local_include_dirs: [
301 "linux/x86_64",
302 "linux",
303 ],
304 },
305 },
306
307 name: "strace",
308
Elliott Hughes77c3ff82017-09-08 17:11:00 -0700309}