-
Notifications
You must be signed in to change notification settings - Fork 6k
Started using Dart_CreateInGroup when using spawn on a release build #23782
Changes from 1 commit
e3f851b
ca7b718
4b6376d
f3e60f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,9 +64,8 @@ static const char* kDartLanguageArgs[] = { | |
| // clang-format on | ||
| }; | ||
|
|
||
| static const char* kDartPrecompilationArgs[] = { | ||
| "--precompilation", | ||
| }; | ||
| static const char* kDartPrecompilationArgs[] = {"--precompilation", | ||
| "--enable-isolate-groups"}; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkustermann Is there a risk to turning this on for users that don't ever call |
||
|
|
||
| FML_ALLOW_UNUSED_TYPE | ||
| static const char* kDartWriteProtectCodeArgs[] = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,7 +133,13 @@ def RunCCTests(build_dir, filter): | |
| # TODO(44614): Re-enable after https://github.com/flutter/flutter/issues/44614 has been addressed. | ||
| # RunEngineExecutable(build_dir, 'fml_unittests', filter, [ fml_unittests_filter ] + shuffle_flags) | ||
|
|
||
| RunEngineExecutable(build_dir, 'runtime_unittests', filter, shuffle_flags) | ||
| # TODO(tbd): Remove this explicit testing of release builds after lightweight | ||
| # isolates are supported in JIT mode. | ||
| release_runtime_out_dir = EnsureReleaseRuntimeTestsAreBuilt() | ||
| RunEngineExecutable(release_runtime_out_dir, 'runtime_unittests', filter, shuffle_flags) | ||
|
||
|
|
||
| if release_runtime_out_dir != build_dir: | ||
| RunEngineExecutable(build_dir, 'runtime_unittests', filter, shuffle_flags) | ||
|
|
||
| RunEngineExecutable(build_dir, 'tonic_unittests', filter, shuffle_flags) | ||
|
|
||
|
|
@@ -304,6 +310,27 @@ def EnsureJavaTestsAreBuilt(android_out_dir): | |
| RunCmd(gn_command, cwd=buildroot_dir) | ||
| RunCmd(ninja_command, cwd=buildroot_dir) | ||
|
|
||
| def EnsureReleaseRuntimeTestsAreBuilt(variant="host_release"): | ||
| """Builds a release build of the runtime tests.""" | ||
| runtime_out_dir = os.path.join(out_dir, variant) | ||
|
|
||
| ninja_command = [ | ||
| 'autoninja', | ||
| '-C', | ||
| runtime_out_dir, | ||
| 'runtime_unittests' | ||
| ] | ||
|
|
||
| if not os.path.exists(runtime_out_dir): | ||
| gn_command = [ | ||
| os.path.join(buildroot_dir, 'flutter', 'tools', 'gn'), | ||
| '--runtime-mode=release', | ||
| '--no-lto', | ||
| ] | ||
| RunCmd(gn_command, cwd=buildroot_dir) | ||
| RunCmd(ninja_command, cwd=buildroot_dir) | ||
| return runtime_out_dir | ||
|
|
||
| def EnsureIosTestsAreBuilt(ios_out_dir): | ||
| """Builds the engine variant and the test dylib containing the XCTests""" | ||
| ninja_command = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of error, the error message must be printed to the log (like elsewhere in this TU). Also, can you make sure we don't have to free the error message buffer? The Dart APIs are a bit inconsistent about what to do with the error buffer. Something you have to
freeit otherwise its a small leak.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tonic class
DartErrorStringis taking care of that here, it was a bit harder to follow before. It should be more clear now.