mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Part of https://github.com/flutter/flutter/issues/145009 This is part one of the wiki migration. This moves all wiki pages wholesale into the new docs directory with no changes. Follow up PRs will sort them, updating breadcrumbs and links.
23 lines
1.5 KiB
Markdown
23 lines
1.5 KiB
Markdown
## Best Practices
|
|
|
|
### Runtime assertions
|
|
|
|
Unopt builds use [FML_DCHECK](https://cs.opensource.google/flutter/engine/+/master:fml/logging.h;l=86?q=FML_DCHECK&ss=flutter%2Fengine) to enable assertion checks across the engine repository. Assertions on dependencies like Dart VM or Skia are not enabled because local and CI builds would be extremely slow.
|
|
Unopt builds are not published or consumed by the flutter/flutter CI to run integration tests or benchmarks.
|
|
|
|
### Sanitizers
|
|
|
|
[flutter/engine](https://github.com/flutter/engine) supports thread, address, memory, undefined behavior and leak sanitizers. Sanitizers are not enabled by default but they can be enabled on local builds following the [sanitizers with the flutter engine](https://github.com/flutter/flutter/wiki/Using-Sanitizers-with-the-Flutter-Engine) instructions.
|
|
|
|
### Builds with sanitizers, and tests with assertions enabled
|
|
|
|
[flutter/engine](https://github.com/flutter/engine) runs automated builds with sanitizers and testing with assertions. Testing with assertions is enabled in all the supported platforms and sanitizers are enabled only on the Linux platform.
|
|
Sanitizer builds:
|
|
|
|
* [Linux unopt](https://ci.chromium.org/p/flutter/builders/prod/Linux%20Unopt)
|
|
|
|
Tests with assertions enabled:
|
|
|
|
* [Linux unopt](https://ci.chromium.org/p/flutter/builders/prod/Linux%20Unopt)
|
|
* [Mac unopt](https://ci.chromium.org/p/flutter/builders/prod/Linux%20mac_unopt)
|
|
* [Windows unopt](https://ci.chromium.org/p/flutter/builders/prod/Windows%20Unopt) |