zig icon indicating copy to clipboard operation
zig copied to clipboard

std.Build: fix --release=x when preferred mode set

Open ifreund opened this issue 1 year ago • 1 comments

Currently if the preferred_optimize_mode is set when calling standardOptimizeOption() then --release={safe,fast,small} will be silently ignored in favor of the preffered optimize mode.

This patch changes this behavior to honor the optimize mode chosen with --release={safe,fast,small} but still use the preferred mode for a bare --release flag.

Fixes https://github.com/ziglang/zig/issues/19732

ifreund avatar Apr 22 '24 12:04 ifreund

(comment moved to the issue: https://github.com/ziglang/zig/issues/19732#issuecomment-2070872820)

andrewrk avatar Apr 22 '24 20:04 andrewrk

This is already working as intended; discussion continues at #19732.

andrewrk avatar Aug 12 '24 18:08 andrewrk