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