Merge pull request #668 from eseidelGoogle/music_asset

Make Asteroids.apk use background music from its bundle
diff --git a/DEPS b/DEPS
index 5545d83..d14b8e5 100644
--- a/DEPS
+++ b/DEPS
@@ -20,7 +20,7 @@
 vars = {
   'chromium_git': 'https://chromium.googlesource.com',
   'skia_revision': '29ccdf86ab0a1649fd775c9431891bacb1391e99',
-  'dart_revision': '38b9945cfd7cb2cc587df013d4d31ae028d99f6b',
+  'dart_revision': '95c951ad190f156eb61b99203c2e4948211c44a7',
   'dart_observatory_packages_revision': 'cdc4b3d4c15b9c0c8e7702dff127b440afbb7485',
 
   'buildtools_revision': '5215ee866bc3e8eb4a7f124212845abf4029e60b',
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index cac77a8..c920299 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -60,6 +60,14 @@
     # The patch is preapplied to the internal toolchain and hence all bots.
     msvs_xtree_patched = false
   }
+
+  # By default, iOS executables are fat binaries that contain armv7 and arm64
+  # build artifacts. This is suitable for release builds and for testing on
+  # older devices. However, generating fat binaries takes a very long time, and,
+  # depending on the application type, may be unnecessary. If the type of
+  # architecture is known beforehand, setting that as the active arch will
+  # greatly reduce build times and reduce binary sizes.
+  ios_active_arch = ""
 }
 
 # default_include_dirs ---------------------------------------------------------
@@ -258,10 +266,19 @@
         "i386",
       ]
     } else if (current_cpu == "arm") {
-      common_mac_flags += [
-        "-arch",
-        "arm64",
-      ]
+      if (ios_active_arch != "") {
+        common_mac_flags += [
+          "-arch",
+          ios_active_arch,
+        ]
+      } else {
+        common_mac_flags += [
+          "-arch",
+          "arm64",
+          "-arch",
+          "armv7",
+        ]
+      }
     }
 
     cflags += common_mac_flags
diff --git a/sky/engine/core/script/dart_controller.cc b/sky/engine/core/script/dart_controller.cc
index 4195c8b..8f9bb0a 100644
--- a/sky/engine/core/script/dart_controller.cc
+++ b/sky/engine/core/script/dart_controller.cc
@@ -159,8 +159,6 @@
   builtin_sky_->InstallView(view);
 }
 
-#if 0
-// Re-enable on resolution of https://github.com/domokit/sky_engine/issues/654
 static void DartController_DartStreamConsumer(
     Dart_StreamConsumer_State state,
     const char* stream_name,
@@ -179,21 +177,16 @@
     mojo::common::BlockingCopyFromString(data, *handle);
   }
 }
-#endif
+
 void DartController::StartTracing() {
-#if 0
-// Re-enable on resolution of https://github.com/domokit/sky_engine/issues/654
   DartIsolateScope isolate_scope(dart_state()->isolate());
   DartApiScope dart_api_scope;
 
   Dart_TimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
-#endif
 }
 
 void DartController::StopTracing(
     mojo::ScopedDataPipeProducerHandle producer) {
-#if 0
-// Re-enable on resolution of https://github.com/domokit/sky_engine/issues/654
   DartIsolateScope isolate_scope(dart_state()->isolate());
   DartApiScope dart_api_scope;
 
@@ -202,7 +195,6 @@
   auto callback =
       reinterpret_cast<Dart_StreamConsumer>(&DartController_DartStreamConsumer);
   Dart_TimelineGetTrace(callback, &producer);
-#endif
 }
 
 } // namespace blink
diff --git a/sky/tools/skyanalyzer b/sky/tools/skyanalyzer
index ce09da5..366e442 100755
--- a/sky/tools/skyanalyzer
+++ b/sky/tools/skyanalyzer
@@ -49,10 +49,10 @@
 
     try:
       subprocess.check_output([
-          DARTANALYZER, "--package-warnings", os.path.abspath(args.app_path),
+          DARTANALYZER, "--package-warnings", args.app_path,
           "--package-root", os.path.join(WORKBENCH, "packages"),
           "--fatal-warnings"
-      ], stderr=subprocess.STDOUT, cwd=WORKBENCH)
+      ], stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
       errors = [l for l in e.output.split('\n')
                 if not any(p.match(l) for p in _IGNORED_PATTERNS)]
diff --git a/travis/build.sh b/travis/build.sh
index 4798d69..2c26a86 100755
--- a/travis/build.sh
+++ b/travis/build.sh
@@ -3,4 +3,4 @@
 
 ./sky/tools/gn --release
 ninja -j 4 -C out/Release
-./sky/tools/skyanalyzer --congratulate ../../../examples/stocks/lib/main.dart
+./sky/tools/skyanalyzer --congratulate examples/stocks/lib/main.dart