Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 300fe57e1a3d6a998f8627adbce2bbb0dcef93dc..3ba45fa7e66d604b8a80e3da71ba334703640cac 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -6045,6 +6045,21 @@ Dart_CompileToKernel(const char* script_uri) { |
#endif |
} |
+DART_EXPORT Dart_KernelCompilationResult |
+Dart_CompileSourcesToKernel(const char* script_uri, |
+ int source_files_count, |
+ Dart_SourceFile sources[]) { |
+#ifdef DART_PRECOMPILED_RUNTIME |
+ Dart_KernelCompilationResult result; |
+ result.status = Dart_KernelCompilationStatus_Unknown; |
+ result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); |
+ return result; |
+#else |
+ return KernelIsolate::CompileToKernel(script_uri, source_files_count, |
+ sources); |
+#endif |
+} |
+ |
// --- Service support --- |
DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |