Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 419eeebc1329563ab816b56325092a4da9f29967..a63fc262b5dfbe7dab9ddf9033be86545b65dfa1 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -6058,6 +6058,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) { |