diff options
Diffstat (limited to 'Magefile.go')
| -rw-r--r-- | Magefile.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Magefile.go b/Magefile.go index cf1adfb..e9458b5 100644 --- a/Magefile.go +++ b/Magefile.go @@ -40,6 +40,7 @@ const ( tracepointsResultNew = "internal/c/generated_tracepoints_result.txt.new" tracepointsGoPath = "internal/tracepoints/generated_tracepoints.go" typesGoPath = "internal/types/generated_types.go" + dockerBuildScript = "scripts/build-with-docker.sh" typesHeaderPath = "internal/c/types.h" VMLINUXPath = "internal/c/vmlinux.h" benchProfilesDir = "bench-profiles" @@ -72,6 +73,16 @@ func All() error { return nil } +// BuildDocker builds the ior binary inside a Rocky Linux 9 Docker container +// and writes the resulting static binary to the repo root. The container +// image is built on the first run (~15-20 min) and reused thereafter. +// The Go version baked into the image is taken from go.mod automatically. +// Requires Docker and a host kernel with tracefs and BTF enabled. +// Pass --run to skip the image rebuild and only recompile ior. +func BuildDocker() error { + return sh.RunV("bash", dockerBuildScript) +} + // BpfBuild builds the embedded BPF object used by the Go binary. func BpfBuild() error { if err := ensureVMLINUX(); err != nil { |
