Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[linux] Allow engine flags via environment vars #21497

Merged
merged 3 commits into from
Oct 6, 2020

Conversation

stuartmorgan-g
Copy link
Contributor

Description

Adds the ability to pass engine switches temporarily at runtime via
environment variables. Uses the same approach recently added to
Windows and macOS.

This is enabled only for debug/profile to avoid potential issues with
tampering with released applications, but if there is a need for that in
the future it could be added (potentially with a whitelist, as is
currently used for Dart VM flags).

Related Issues

Fixes flutter/flutter#60393

Tests

I added the following tests: FlDartProject tests that the switches are passed through correctly.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change.

@stuartmorgan-g
Copy link
Contributor Author

@dnfield Ping?

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuartmorgan-g
Copy link
Contributor Author

luci-engine bot seems to be confused about status; the last row is entirely green. Given that, landing.

@stuartmorgan-g stuartmorgan-g merged commit 042c7f0 into flutter:master Oct 6, 2020
@stuartmorgan-g stuartmorgan-g deleted the linux-env-switches branch October 6, 2020 18:17
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 6, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 6, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 6, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2020
liyuqian added a commit to liyuqian/flutter that referenced this pull request Oct 7, 2020
flutter/engine@7e6191d...9a7b556

2020-10-06 [email protected] hasStrings Linux (flutter/engine#21388)
2020-10-06 [email protected] add api_conform_test to analyze step. remove build script. (flutter/engine#21633)
2020-10-06 [email protected] Roll Fuchsia Mac SDK from 8q-OCkyhO... to xM2vYLfIT... (flutter/engine#21635)
2020-10-06 [email protected] Roll Skia from 33b42e12ab71 to 107114dd1d6e (5 revisions) (flutter/engine#21634)
2020-10-06 [email protected] Roll Fuchsia Linux SDK from HeAkKHbFY... to kr1tNtZvZ... (flutter/engine#21630)
2020-10-06 [email protected] running web tests only on DEPS and web directories (flutter/engine#21613)
2020-10-06 [email protected] Roll Skia from c3bdd1c597dc to 33b42e12ab71 (6 revisions) (flutter/engine#21628)
2020-10-06 [email protected] Use the gpu config for shell_unittests to declare SHELL_ENABLE_{GL,VULKAN} (flutter/engine#21603)
2020-10-06 [email protected] [linux] Allow engine flags via environment vars (flutter/engine#21497)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 8, 2020
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Oct 20, 2020
Adds the ability to pass engine switches temporarily at runtime via
environment variables. Uses the same approach recently added to
Windows and macOS.

This is enabled only for debug/profile to avoid potential issues with
tampering with released applications, but if there is a need for that in
the future it could be added (potentially with a whitelist, as is
currently used for Dart VM flags).

Fixes flutter/flutter#60393
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass engine switches arguments/dart VM flags to the engine in desktop
3 participants