Skip to content

Support negation for all boolean engine flags from the command line #193354

Open

Description

@camsim99

Currently, presence-only boolean engine flags (such as --enable-software-rendering, --trace-startup, and --verbose-logging) cannot be overridden or disabled from the command line if enabled via platform metadata (such as AndroidManifest.xml) unlike flags with values can (like --enable-impeller=true|false). Because these switches lack a negation syntax (e.g., --flag=false or --no-<flag>), the engine only checks for presence via fml::CommandLine::HasOption(), creating an asymmetric precedence model where command-line flags cannot override manifest settings without manually modifying source configuration and rebuilding.

Because of this, we should consider supporting negation for presence-only boolean engine flags so that the precedence between command line and manifest defined flags is consistent.

Possible approaches

  1. Standardize on =true|false switches: Transition all boolean engine flags to key-value toggles (similar to --enable-impeller=true|false), allowing command-line arguments to override manifest settings using standard last-argument-wins evaluation.
  2. Support --no-<flag> cancellation: Introduce --no-<flag> syntax support in the engine switch parser or embedder loaders (e.g., FlutterLoader) that explicitly cancels out flags previously injected by platform metadata.

Activity

  1. added
    platform-androidAndroid applications specifically
    engineflutter/engine related. See also e: labels.
    P2Important issues not at the top of the work list
    team-androidOwned by Android platform team
    fyi-toolFor the attention of Flutter Tool team
    triaged-androidTriaged by Android platform team
    on Sep 25, 2026
  2. camsim99 commented on Sep 29, 2026

    @camsim99
    ContributorAuthor

    @gmackall pointed out that these "presence only" flags are specified as not negatable, e.g.

    . Maybe we can flip that

  3. self-assigned this
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.fyi-toolFor the attention of Flutter Tool teamplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions