[vm] Pass snapshot flag to kernel_service

Enable reporting of null safety compilation mode when running
`dart compile aot-snapshot`, `dart compile jit-snapshot`,
and `dart compile kernel`.

Closes #44234

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I0d4b35c6ccb4167c0c7539a4eb24a5139e29cf53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178990
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Johnni Winther
2021-01-18 09:27:59 +00:00
committed by commit-bot@chromium.org
parent e8d4569e37
commit f8b0d26cc3
17 changed files with 303 additions and 71 deletions
+5
View File
@@ -3537,6 +3537,10 @@ DART_EXPORT Dart_Port Dart_KernelPort();
*
* \param platform_kernel_size The length of the platform_kernel buffer.
*
* \param snapshot_compile Set to `true` when the compilation is for a snapshot.
* This is used by the frontend to determine if compilation related information
* should be printed to console (e.g., null safety mode).
*
* \return Returns the result of the compilation.
*
* On a successful compilation the returned [Dart_KernelCompilationResult] has
@@ -3554,6 +3558,7 @@ Dart_CompileToKernel(const char* script_uri,
const uint8_t* platform_kernel,
const intptr_t platform_kernel_size,
bool incremental_compile,
bool snapshot_compile,
const char* package_config);
typedef struct {