| package { | |
| default_applicable_licenses: ["external_fio_license"], | |
| } | |
| license { | |
| name: "external_fio_license", | |
| visibility: [":__subpackages__"], | |
| license_kinds: [ | |
| "SPDX-license-identifier-GPL-2.0-only", | |
| ], | |
| license_text: [ | |
| "LICENSE", | |
| ], | |
| } | |
| cc_defaults { | |
| name: "fio_defaults", | |
| cflags: [ | |
| "-DCONFIG_SYNC_FILE_RANGE", | |
| "-DCONFIG_PWRITEV2", | |
| "-DCONFIG_HAVE_BOOL", | |
| "-DCONFIG_SEED_BUCKETS=16", | |
| "-DCONFIG_HAVE_GETTID", | |
| "-DCONFIG_NVME_URING_CMD", | |
| "-D_GNU_SOURCE", | |
| "-DCONFIG_3ARG_AFFINITY", | |
| "-DCONFIG_CLOCK_GETTIME", | |
| "-DCONFIG_CLOCK_MONOTONIC", | |
| "-DCONFIG_FDATASYNC", | |
| "-DCONFIG_GETOPT_LONG_ONLY", | |
| "-DCONFIG_GETTIMEOFDAY", | |
| "-DCONFIG_IPV6", | |
| "-DCONFIG_LINUX_FALLOCATE", | |
| "-DCONFIG_LINUX_SPLICE", | |
| "-DCONFIG_LITTLE_ENDIAN", | |
| "-DCONFIG_PSHARED", | |
| "-DCONFIG_RLIMIT_MEMLOCK", | |
| "-DCONFIG_RUSAGE_THREAD", | |
| "-DCONFIG_SCHED_IDLE", | |
| "-DCONFIG_SETVBUF", | |
| "-DCONFIG_SOCKLEN_T", | |
| "-DCONFIG_STRCASESTR", | |
| "-DCONFIG_STRLCAT", | |
| "-DCONFIG_STRSEP", | |
| "-DCONFIG_TCP_NODELAY", | |
| "-DCONFIG_TLS_THREAD", | |
| "-DCONFIG_ZLIB", | |
| "-DFIO_INC_DEBUG", | |
| "-DFIO_INTERNAL", | |
| "-D_FILE_OFFSET_BITS=64", | |
| "-std=gnu99", | |
| "-Wno-gnu-pointer-arith", | |
| "-Wno-unused-parameter", | |
| "-Wno-unused-variable", | |
| "-Wno-missing-field-initializers", | |
| ], | |
| multilib: { | |
| lib32: { | |
| cflags: [ | |
| "-DBITS_PER_LONG=32", | |
| "-DCONFIG_32BIT", | |
| ], | |
| }, | |
| lib64: { | |
| cflags: [ | |
| "-DBITS_PER_LONG=64", | |
| "-DCONFIG_64BIT", | |
| "-DCONFIG_SFAA", | |
| ], | |
| }, | |
| }, | |
| } | |
| genrule { | |
| name: "fio-version-gen", | |
| tool_files: ["FIO-VERSION-GEN"], | |
| cmd: "$(location FIO-VERSION-GEN) && sed 's/FIO_VERSION = \\(.*\\)/#define FIO_VERSION \"\\1\"/' FIO-VERSION-FILE > $(out)", | |
| out: ["fio-version.h"], | |
| } | |
| cc_binary { | |
| name: "fio", | |
| defaults: ["fio_defaults"], | |
| generated_headers: ["fio-version-gen"], | |
| cflags: ["-include fio-version.h"], | |
| shared_libs: [ | |
| "libz", | |
| ], | |
| srcs: [ | |
| "backend.c", | |
| "blktrace.c", | |
| "cconv.c", | |
| "cgroup.c", | |
| "client.c", | |
| "dataplacement.c", | |
| "debug.c", | |
| "dedupe.c", | |
| "diskutil.c", | |
| "eta.c", | |
| "fifo.c", | |
| "filehash.c", | |
| "filelock.c", | |
| "filesetup.c", | |
| "fio.c", | |
| "fio_sem.c", | |
| "flow.c", | |
| "gettime.c", | |
| "gettime-thread.c", | |
| "helpers.c", | |
| "helper_thread.c", | |
| "idletime.c", | |
| "init.c", | |
| "ioengines.c", | |
| "iolog.c", | |
| "io_u.c", | |
| "io_u_queue.c", | |
| "json.c", | |
| "libfio.c", | |
| "log.c", | |
| "memory.c", | |
| "optgroup.c", | |
| "options.c", | |
| "parse.c", | |
| "profile.c", | |
| "pshared.c", | |
| "rate-submit.c", | |
| "rwlock.c", | |
| "server.c", | |
| "smalloc.c", | |
| "stat.c", | |
| "steadystate.c", | |
| "td_error.c", | |
| "tickmarks.c", | |
| "time.c", | |
| "trim.c", | |
| "verify.c", | |
| "workqueue.c", | |
| "zbd.c", | |
| "zone-dist.c", | |
| "crc/*.c", | |
| "engines/cpu.c", | |
| "engines/cmdprio.c", | |
| "engines/mmap.c", | |
| "engines/nvme.c", | |
| "engines/null.c", | |
| "engines/sg.c", | |
| "engines/splice.c", | |
| "engines/sync.c", | |
| "engines/io_uring.c", | |
| "lib/*.c", | |
| "oslib/linux-dev-lookup.c", | |
| ], | |
| } |