Pass -Ddart.developer.causal_async_stacks=true to frontend_server invocations. (#42354)

Bytecode generation will otherwise omit prologue code, causing --causal-async-stacks passed to the VM to behave inconsistently.
This commit is contained in:
Ryan Macnak 2019-10-10 10:41:24 -07:00 committed by GitHub
parent 812e0387c3
commit 2a40c2ddb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -96,6 +96,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler {
bool linkPlatformKernelIn = false,
bool aot = false,
bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation,
List<String> extraFrontEndOptions,
bool targetProductVm = false,
@ -133,6 +134,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler {
linkPlatformKernelIn: linkPlatformKernelIn,
aot: aot,
enableAsserts: enableAsserts,
causalAsyncStacks: causalAsyncStacks,
trackWidgetCreation: trackWidgetCreation,
extraFrontEndOptions: extraFrontEndOptions,
targetProductVm: targetProductVm,

View file

@ -250,6 +250,7 @@ class KernelCompiler {
bool linkPlatformKernelIn = false,
bool aot = false,
bool enableAsserts = false,
bool causalAsyncStacks = true,
@required bool trackWidgetCreation,
List<String> extraFrontEndOptions,
String packagesPath,
@ -286,6 +287,7 @@ class KernelCompiler {
sdkRoot,
'--strong',
'--target=$targetModel',
'-Ddart.developer.causal_async_stacks=$causalAsyncStacks',
if (enableAsserts) '--enable-asserts',
if (trackWidgetCreation) '--track-widget-creation',
if (!linkPlatformKernelIn) '--no-link-platform',
@ -428,6 +430,7 @@ class ResidentCompiler {
ResidentCompiler(
this._sdkRoot, {
bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation = false,
String packagesPath,
List<String> fileSystemRoots,
@ -439,6 +442,7 @@ class ResidentCompiler {
List<String> experimentalFlags,
}) : assert(_sdkRoot != null),
_enableAsserts = enableAsserts,
_causalAsyncStacks = causalAsyncStacks,
_trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath,
_fileSystemRoots = fileSystemRoots,
@ -456,6 +460,7 @@ class ResidentCompiler {
}
final bool _enableAsserts;
final bool _causalAsyncStacks;
final bool _trackWidgetCreation;
final String _packagesPath;
final TargetModel _targetModel;
@ -569,6 +574,7 @@ class ResidentCompiler {
'--incremental',
'--strong',
'--target=$_targetModel',
'-Ddart.developer.causal_async_stacks=$_causalAsyncStacks',
if (outputPath != null) ...<String>[
'--output-dill',
outputPath,

View file

@ -392,6 +392,7 @@ class FakeKernelCompiler implements KernelCompiler {
bool linkPlatformKernelIn = false,
bool aot = false,
bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation,
List<String> extraFrontEndOptions,
String packagesPath,