1// 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", 39 "desc.c", 40 "dirent.c", 41 "dirent64.c", 42 "dm.c", 43 "dyxlat.c", 44 "epoll.c", 45 "error_prints.c", 46 "evdev.c", 47 "eventfd.c", 48 "execve.c", 49 "fadvise.c", 50 "fallocate.c", 51 "fanotify.c", 52 "fchownat.c", 53 "fcntl.c", 54 "fetch_bpf_fprog.c", 55 "fetch_indirect_syscall_args.c", 56 "fetch_struct_flock.c", 57 "fetch_struct_keyctl_kdf_params.c", 58 "fetch_struct_mmsghdr.c", 59 "fetch_struct_msghdr.c", 60 "fetch_struct_stat.c", 61 "fetch_struct_stat64.c", 62 "fetch_struct_statfs.c", 63 "file_handle.c", 64 "file_ioctl.c", 65 "filter_qualify.c", 66 "flock.c", 67 "fstatfs.c", 68 "fstatfs64.c", 69 "fs_x_ioctl.c", 70 "futex.c", 71 "getcpu.c", 72 "getcwd.c", 73 "getpagesize.c", 74 "getrandom.c", 75 "get_robust_list.c", 76 "hdio.c", 77 "hostname.c", 78 "inotify.c", 79 "io.c", 80 "ioctl.c", 81 "ioperm.c", 82 "iopl.c", 83 "ioprio.c", 84 "ipc.c", 85 "ipc_msg.c", 86 "ipc_msgctl.c", 87 "ipc_sem.c", 88 "ipc_shm.c", 89 "ipc_shmctl.c", 90 "kcmp.c", 91 "kexec.c", 92 "keyctl.c", 93 "kvm.c", 94 "ldt.c", 95 "link.c", 96 "listen.c", 97 "lookup_dcookie.c", 98 "loop.c", 99 "lseek.c", 100 "mem.c", 101 "membarrier.c", 102 "memfd_create.c", 103 "mknod.c", 104 "mmsghdr.c", 105 "mount.c", 106 "mq.c", 107 "msghdr.c", 108 "mtd.c", 109 "net.c", 110 "netlink.c", 111 "netlink_crypto.c", 112 "netlink_inet_diag.c", 113 "netlink_netlink_diag.c", 114 "netlink_packet_diag.c", 115 "netlink_route.c", 116 "netlink_selinux.c", 117 "netlink_smc_diag.c", 118 "netlink_sock_diag.c", 119 "netlink_unix_diag.c", 120 "nlattr.c", 121 "nsfs.c", 122 "numa.c", 123 "number_set.c", 124 "oldstat.c", 125 "open.c", 126 "pathtrace.c", 127 "perf.c", 128 "personality.c", 129 "pkeys.c", 130 "poll.c", 131 "prctl.c", 132 "print_dev_t.c", 133 "print_group_req.c", 134 "print_ifindex.c", 135 "print_mq_attr.c", 136 "print_msgbuf.c", 137 "print_sigevent.c", 138 "print_sg_req_info.c", 139 "print_statfs.c", 140 "print_struct_stat.c", 141 "print_time.c", 142 "print_timespec.c", 143 "print_timeval.c", 144 "print_timex.c", 145 "printmode.c", 146 "printrusage.c", 147 "printsiginfo.c", 148 "process.c", 149 "process_vm.c", 150 "ptp.c", 151 "quota.c", 152 "readahead.c", 153 "readlink.c", 154 "reboot.c", 155 "renameat.c", 156 "resource.c", 157 "rtc.c", 158 "rtnl_addr.c", 159 "rtnl_addrlabel.c", 160 "rtnl_dcb.c", 161 "rtnl_link.c", 162 "rtnl_mdb.c", 163 "rtnl_neigh.c", 164 "rtnl_neightbl.c", 165 "rtnl_netconf.c", 166 "rtnl_nsid.c", 167 "rtnl_route.c", 168 "rtnl_rule.c", 169 "rtnl_tc.c", 170 "rtnl_tc_action.c", 171 "rt_sigframe.c", 172 "rt_sigreturn.c", 173 "sched.c", 174 "scsi.c", 175 "seccomp.c", 176 "sendfile.c", 177 "sg_io_v3.c", 178 "sg_io_v4.c", 179 "shutdown.c", 180 "sigaltstack.c", 181 "signal.c", 182 "signalfd.c", 183 "sigreturn.c", 184 "sock.c", 185 "sockaddr.c", 186 "socketcall.c", 187 "socketutils.c", 188 "sram_alloc.c", 189 "stat.c", 190 "stat64.c", 191 "statfs.c", 192 "statfs64.c", 193 "statx.c", 194 "strace.c", 195 "string_to_uint.c", 196 "swapon.c", 197 "sync_file_range.c", 198 "sync_file_range2.c", 199 "syscall.c", 200 "sysctl.c", 201 "sysinfo.c", 202 "syslog.c", 203 "sysmips.c", 204 "term.c", 205 "time.c", 206 "times.c", 207 "truncate.c", 208 "ubi.c", 209 "ucopy.c", 210 "uid16.c", 211 "uid.c", 212 "umask.c", 213 "umount.c", 214 "uname.c", 215 "upeek.c", 216 "upoke.c", 217 "userfaultfd.c", 218 "ustat.c", 219 "util.c", 220 "utime.c", 221 "utimes.c", 222 "v4l2.c", 223 "wait.c", 224 "xattr.c", 225 "xlat.c", 226 "xmalloc.c", 227 ], 228 229 // We have "config.h", but since we're using one file for both LP32 and LP64, 230 // we need to set the hard-coded size #defines here instead. 231 cflags: ["-DHAVE_CONFIG_H"] + [ 232 "-DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG", 233 "-DSIZEOF_OFF_T=SIZEOF_LONG", 234 ] + [ 235 "-Wall", 236 "-Werror", 237 "-Wno-missing-field-initializers", 238 "-Wno-pointer-arith", 239 "-Wno-unused-parameter", 240 "-Wno-sign-compare", 241 "-fno-strict-aliasing", 242 ], 243 multilib: { 244 lib32: { 245 cflags: [ 246 "-DSIZEOF_LONG_LONG=8", 247 "-DSIZEOF_LONG=4", 248 "-DSIZEOF_RLIM_T=4", 249 "-DHAVE_STRUCT_STAT64=1", 250 ], 251 }, 252 lib64: { 253 cflags: [ 254 "-DSIZEOF_LONG_LONG=8", 255 "-DSIZEOF_LONG=8", 256 "-DSIZEOF_RLIM_T=8", 257 ], 258 }, 259 }, 260 261 arch: { 262 arm: { 263 cflags: ["-DARM=1"] + ["-DHAVE_STRUCT___OLD_KERNEL_STAT=1"], 264 265 local_include_dirs: [ 266 "linux/arm", 267 "linux", 268 ], 269 }, 270 arm64: { 271 cflags: ["-DAARCH64=1"], 272 273 local_include_dirs: [ 274 "linux/aarch64", 275 "linux", 276 ], 277 }, 278 mips: { 279 enabled: false, 280 }, 281 mips64: { 282 enabled: false, 283 }, 284 x86: { 285 cflags: ["-DI386=1"] + ["-DHAVE_STRUCT___OLD_KERNEL_STAT=1"], 286 287 local_include_dirs: [ 288 "linux/i386", 289 "linux", 290 ], 291 }, 292 x86_64: { 293 cflags: ["-DX86_64=1"], 294 295 local_include_dirs: [ 296 "linux/x86_64", 297 "linux", 298 ], 299 }, 300 }, 301 302 name: "strace", 303 304} 305