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

Unified Diff: utils/application_snapshot.gni

Issue 2937503003: Reapply "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binar… (Closed)
Patch Set: Created 3 years, 6 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
Index: utils/application_snapshot.gni
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 9b5278672c0a1cd7b45b253fa21e723bbc56b852..f2d83193cddd1e7a305d2ddd2085ee090af1f4e6 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -10,6 +10,9 @@ declare_args() {
# Default to building app-jit snapshots. The simulator and cross builds
# override this to script snapshots to cut down on build time.
dart_snapshot_kind = "app-jit"
+ if (target_cpu != host_cpu) {
+ dart_snapshot_kind = "script"
+ }
}
template("application_snapshot") {
@@ -25,7 +28,7 @@ template("application_snapshot") {
if (defined(invoker.deps)) {
extra_deps += invoker.deps
}
- extra_inputs = [main_dart]
+ extra_inputs = [ main_dart ]
if (defined(invoker.inputs)) {
extra_inputs += invoker.inputs
}
@@ -47,16 +50,22 @@ template("application_snapshot") {
abs_output = rebase_path(output)
main_file = rebase_path(main_dart)
- args = [ "--packages=$dot_packages",
- "--snapshot=$abs_output" ]
+ args = [
+ "--packages=$dot_packages",
+ "--snapshot=$abs_output",
+ ]
if (dart_snapshot_kind == "script") {
- args += ["--snapshot-kind=script",
- main_file ]
+ args += [
+ "--snapshot-kind=script",
+ main_file,
+ ]
assert(training_args != "", "Ignoring unused argument")
} else if (dart_snapshot_kind == "app-jit") {
- args += ["--snapshot-kind=app-jit",
- main_file ] + training_args
+ args += [
+ "--snapshot-kind=app-jit",
+ main_file,
+ ] + training_args
} else {
assert(false, "Bad dart_snapshot_kind: $dart_snapshot_kind")
}
« runtime/bin/BUILD.gn ('K') | « runtime/vm/BUILD.gn ('k') | utils/dartanalyzer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698