Skip to content

Fix optimisation targets in build.zig (-Drelease-fast => --release-fast etc.) #4077

Description

@momumi

Currently when using standardReleaseOptions() in build.zig, and running zig build --help shows (also in the docs):

Project-Specific Options:
-Drelease-safe=[bool] optimizations on and safety on
-Drelease-fast=[bool] optimizations on and safety off
-Drelease-small=[bool] size optimizations on and safety off

However, zig build-exe --help uses:

 --release-fast build with optimizations on and safety off
--release-safe build with optimizations on and safety on
--release-small build with size optimizations on and safety off

If I try use zig build -Drelease-fast=true it actually produces a debug build, and zig build --release-fast doesn't work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions