Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1232)

Unified Diff: runtime/bin/snapshot_utils.cc

Issue 2871713002: Change build.py to be like ninja.py and only use a single GN/Ninja invocation to cross-build the SD… (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/build.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/snapshot_utils.cc
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc
index f1ad5354d00e037166bc4be51b25f67f3a469e2c..e6776ef662e821c617063825ce991834aa65abc0 100644
--- a/runtime/bin/snapshot_utils.cc
+++ b/runtime/bin/snapshot_utils.cc
@@ -347,7 +347,20 @@ void Snapshot::GenerateScript(const char* snapshot_filename) {
void Snapshot::GenerateAppJIT(const char* snapshot_filename) {
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_DBC)
+ // Snapshots with code are not supported on IA32 or DBC.
+ uint8_t* isolate_buffer = NULL;
+ intptr_t isolate_size = 0;
+
+ Dart_Handle result =
+ Dart_CreateSnapshot(NULL, NULL, &isolate_buffer, &isolate_size);
+ if (Dart_IsError(result)) {
+ ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
+ }
+
+ WriteAppSnapshot(snapshot_filename, NULL, 0, NULL, 0, isolate_buffer,
+ isolate_size, NULL, 0);
+#else
uint8_t* isolate_data_buffer = NULL;
intptr_t isolate_data_size = 0;
uint8_t* isolate_instructions_buffer = NULL;
@@ -361,19 +374,7 @@ void Snapshot::GenerateAppJIT(const char* snapshot_filename) {
WriteAppSnapshot(snapshot_filename, NULL, 0, NULL, 0, isolate_data_buffer,
isolate_data_size, isolate_instructions_buffer,
isolate_instructions_size);
-#else
- uint8_t* isolate_buffer = NULL;
- intptr_t isolate_size = 0;
-
- Dart_Handle result =
- Dart_CreateSnapshot(NULL, NULL, &isolate_buffer, &isolate_size);
- if (Dart_IsError(result)) {
- ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
- }
-
- WriteAppSnapshot(snapshot_filename, NULL, 0, NULL, 0, isolate_buffer,
- isolate_size, NULL, 0);
-#endif // defined(TARGET_ARCH_X64)
+#endif
}
« no previous file with comments | « no previous file | tools/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698