From 00fc057d88ccccf2bb64fb991f9c9d6c02f242ef Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 18 Jan 2019 12:24:21 -0800 Subject: [PATCH] Configure the embedder in AOT in "profile" and "release" runtime modes. (flutter/engine#7533) --- engine/src/flutter/shell/platform/embedder/BUILD.gn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/embedder/BUILD.gn b/engine/src/flutter/shell/platform/embedder/BUILD.gn index 633449795ca..042d3ceced5 100644 --- a/engine/src/flutter/shell/platform/embedder/BUILD.gn +++ b/engine/src/flutter/shell/platform/embedder/BUILD.gn @@ -2,9 +2,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("$flutter_root/testing/testing.gni") +import("$flutter_root/common/config.gni") import("$flutter_root/shell/gpu/gpu.gni") import("$flutter_root/shell/platform/embedder/embedder.gni") +import("$flutter_root/testing/testing.gni") shell_gpu_configuration("embedder_gpu_configuration") { enable_software = true @@ -39,12 +40,17 @@ source_set("embedder") { "$flutter_root/fml", "$flutter_root/lib/snapshot", "$flutter_root/shell/common", - "//third_party/dart/runtime:libdart_jit", "//third_party/dart/runtime/bin:dart_io_api", "//third_party/skia", "//third_party/tonic", ] + if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "release") { + deps += [ "//third_party/dart/runtime:libdart_precompiled_runtime" ] + } else { + deps += [ "//third_party/dart/runtime:libdart_jit" ] + } + public_configs = [ "$flutter_root:config" ] }