Skip to content

Default to build mode following --compilation_mode #38

@aherrmann

Description

@aherrmann

The Zig build mode should default to a setting in line with --compilation_mode such that
--compilation_mode=fastbuild implies Debug,
--compilation_mode=dbg implies Debug,
--compilation_mode=opt implies ReleaseFast.

Unfortunately build_setting_default is not configurable, meaning we cannot select on the compilation mode to defined the default value for the mode flag. An alternative is to add an auto option, make that the default, and add logic to the settings rule to select the correct value.

An issue with this approach is that it breaks the config setting defined here. A workaroud would be to use config_setting_group to define a config setting that resolves to mode==debug or (mode==auto and compilation_mode==dbg) etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions