Index: runtime/bin/run_vm_tests.cc |
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc |
index ddb8a4e37bb1846b32cc68cb8dade34fbce15b64..103fede8f86396548ea326c36eeb45e9000d7873 100644 |
--- a/runtime/bin/run_vm_tests.cc |
+++ b/runtime/bin/run_vm_tests.cc |
@@ -14,6 +14,12 @@ |
#include "vm/dart.h" |
#include "vm/unit_test.h" |
+extern "C" { |
+extern const uint8_t kDartVmSnapshotData[]; |
+extern const uint8_t kDartVmSnapshotInstructions[]; |
+extern const uint8_t kDartCoreIsolateSnapshotData[]; |
+extern const uint8_t kDartCoreIsolateSnapshotInstructions[]; |
+} |
// TODO(iposva, asiva): This is a placeholder for the real unittest framework. |
namespace dart { |
@@ -21,10 +27,16 @@ namespace dart { |
// Defined in vm/os_thread_win.cc |
extern bool private_flag_windows_run_tls_destructors; |
-// vm_snapshot_data_buffer points to a snapshot for the vm isolate if we |
-// link in a snapshot otherwise it is initialized to NULL. |
-extern const uint8_t* bin::vm_snapshot_data; |
-extern const uint8_t* bin::vm_snapshot_instructions; |
+// Snapshot pieces when we link in a snapshot. |
+#if defined(DART_NO_SNAPSHOT) |
+#error "run_vm_tests must be built with a snapshot" |
+#else |
+const uint8_t* bin::vm_snapshot_data = kDartVmSnapshotData; |
+const uint8_t* bin::vm_snapshot_instructions = kDartVmSnapshotInstructions; |
+const uint8_t* bin::core_isolate_snapshot_data = kDartCoreIsolateSnapshotData; |
+const uint8_t* bin::core_isolate_snapshot_instructions = |
+ kDartCoreIsolateSnapshotInstructions; |
+#endif |
// Only run tests that match the filter string. The default does not match any |
// tests. |