mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This reverts commit fae8141f9f5f64bd9aad8d53f031f2416bf82ec8.
This commit is contained in:
parent
6184f62897
commit
cee437e8d1
10
BUILD.gn
10
BUILD.gn
@ -169,16 +169,10 @@ if (is_fuchsia) {
|
||||
"//flutter/fml:fml_tests",
|
||||
"//flutter/runtime:runtime_tests",
|
||||
"//flutter/runtime:runtime_tests_next",
|
||||
"//flutter/shell/common:shell_tests",
|
||||
"//flutter/shell/common:shell_tests_next",
|
||||
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_scenic_tests",
|
||||
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_tests",
|
||||
]
|
||||
|
||||
# TODO(fxb/55353): These break with LTO enabled
|
||||
if (!enable_lto) {
|
||||
deps += [
|
||||
"//flutter/shell/common:shell_tests",
|
||||
"//flutter/shell/common:shell_tests_next",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,22 +14,11 @@ template("runner") {
|
||||
assert(defined(invoker.product), "The parameter 'product' must be defined")
|
||||
assert(defined(invoker.output_name),
|
||||
"The parameter 'output_name' must be defined")
|
||||
assert(defined(invoker.extra_deps),
|
||||
"The parameter 'extra_deps' must be defined")
|
||||
|
||||
invoker_output_name = invoker.output_name
|
||||
extra_defines = invoker.extra_defines
|
||||
extra_deps = invoker.extra_deps
|
||||
|
||||
extra_configs = []
|
||||
if (is_debug) {
|
||||
extra_configs += [ "//third_party/dart/build/config:debug" ]
|
||||
}
|
||||
|
||||
extra_defines = []
|
||||
if (defined(invoker.extra_defines)) {
|
||||
extra_defines += invoker.extra_defines
|
||||
}
|
||||
|
||||
executable(target_name) {
|
||||
output_name = invoker_output_name
|
||||
|
||||
@ -46,8 +35,6 @@ template("runner") {
|
||||
"service_isolate.h",
|
||||
]
|
||||
|
||||
configs += extra_configs
|
||||
|
||||
defines = extra_defines
|
||||
|
||||
dart_deps = []
|
||||
@ -88,11 +75,10 @@ template("runner") {
|
||||
runner("dart_jit_runner_bin") {
|
||||
output_name = "dart_jit_runner"
|
||||
product = false
|
||||
|
||||
extra_defines = []
|
||||
if (flutter_runtime_mode == "profile") {
|
||||
extra_defines = [ "FLUTTER_PROFILE" ]
|
||||
extra_defines += [ "FLUTTER_PROFILE" ]
|
||||
}
|
||||
|
||||
extra_deps = [
|
||||
"//third_party/dart/runtime:libdart_jit",
|
||||
"//third_party/dart/runtime/platform:libdart_platform_jit",
|
||||
@ -102,9 +88,7 @@ runner("dart_jit_runner_bin") {
|
||||
runner("dart_jit_product_runner_bin") {
|
||||
output_name = "dart_jit_product_runner"
|
||||
product = true
|
||||
|
||||
extra_defines = [ "DART_PRODUCT" ]
|
||||
|
||||
extra_deps = [
|
||||
"//third_party/dart/runtime:libdart_jit_product",
|
||||
"//third_party/dart/runtime/platform:libdart_platform_jit_product",
|
||||
@ -114,12 +98,10 @@ runner("dart_jit_product_runner_bin") {
|
||||
runner("dart_aot_runner_bin") {
|
||||
output_name = "dart_aot_runner"
|
||||
product = false
|
||||
|
||||
extra_defines = [ "AOT_RUNTIME" ]
|
||||
if (flutter_runtime_mode == "profile") {
|
||||
extra_defines += [ "FLUTTER_PROFILE" ]
|
||||
}
|
||||
|
||||
extra_deps = [
|
||||
"embedder:dart_aot_snapshot_cc",
|
||||
"//third_party/dart/runtime:libdart_precompiled_runtime",
|
||||
@ -130,12 +112,10 @@ runner("dart_aot_runner_bin") {
|
||||
runner("dart_aot_product_runner_bin") {
|
||||
output_name = "dart_aot_product_runner"
|
||||
product = true
|
||||
|
||||
extra_defines = [
|
||||
"AOT_RUNTIME",
|
||||
"DART_PRODUCT",
|
||||
]
|
||||
|
||||
extra_deps = [
|
||||
"embedder:dart_aot_product_snapshot_cc",
|
||||
"//third_party/dart/runtime:libdart_precompiled_runtime_product",
|
||||
|
||||
@ -12,176 +12,27 @@ import("//flutter/tools/fuchsia/dart.gni")
|
||||
import("//flutter/tools/fuchsia/fuchsia_archive.gni")
|
||||
import("//flutter/tools/fuchsia/fuchsia_libs.gni")
|
||||
import("//flutter/vulkan/config.gni")
|
||||
import("engine_flutter_runner.gni")
|
||||
|
||||
# Fuchsia uses its own custom Surface implementation.
|
||||
shell_gpu_configuration("fuchsia_gpu_configuration_legacy") {
|
||||
shell_gpu_configuration("fuchsia_legacy_gpu_configuration") {
|
||||
enable_software = false
|
||||
enable_gl = false
|
||||
enable_vulkan = false
|
||||
enable_metal = false
|
||||
}
|
||||
|
||||
source_set("flutter_runner_sources") {
|
||||
sources = [
|
||||
"accessibility_bridge.cc",
|
||||
"accessibility_bridge.h",
|
||||
"component.cc",
|
||||
"component.h",
|
||||
"compositor_context.cc",
|
||||
"compositor_context.h",
|
||||
"engine.cc",
|
||||
"engine.h",
|
||||
"flutter_runner_product_configuration.cc",
|
||||
"flutter_runner_product_configuration.h",
|
||||
"fuchsia_intl.cc",
|
||||
"fuchsia_intl.h",
|
||||
"isolate_configurator.cc",
|
||||
"isolate_configurator.h",
|
||||
"logging.h",
|
||||
"loop.cc",
|
||||
"loop.h",
|
||||
"platform_view.cc",
|
||||
"platform_view.h",
|
||||
"runner.cc",
|
||||
"runner.h",
|
||||
"session_connection.cc",
|
||||
"session_connection.h",
|
||||
"surface.cc",
|
||||
"surface.h",
|
||||
"task_observers.cc",
|
||||
"task_observers.h",
|
||||
"task_runner_adapter.cc",
|
||||
"task_runner_adapter.h",
|
||||
"thread.cc",
|
||||
"thread.h",
|
||||
"unique_fdio_ns.h",
|
||||
"vsync_recorder.cc",
|
||||
"vsync_recorder.h",
|
||||
"vsync_waiter.cc",
|
||||
"vsync_waiter.h",
|
||||
"vulkan_surface.cc",
|
||||
"vulkan_surface.h",
|
||||
"vulkan_surface_pool.cc",
|
||||
"vulkan_surface_pool.h",
|
||||
"vulkan_surface_producer.cc",
|
||||
"vulkan_surface_producer.h",
|
||||
]
|
||||
|
||||
# The use of these dependencies is temporary and will be moved behind the
|
||||
# embedder API.
|
||||
flutter_deps = [
|
||||
":fuchsia_gpu_configuration_legacy",
|
||||
"//flutter/assets",
|
||||
"//flutter/common",
|
||||
"//flutter/flow:flow_fuchsia_legacy",
|
||||
"//flutter/fml",
|
||||
"//flutter/lib/ui:ui_fuchsia_legacy",
|
||||
"//flutter/runtime:runtime_fuchsia_legacy",
|
||||
"//flutter/shell/common:common_fuchsia_legacy",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/vulkan",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.sys",
|
||||
"$fuchsia_sdk_root/pkg:async-loop-cpp",
|
||||
"$fuchsia_sdk_root/pkg:scenic_cpp",
|
||||
"$fuchsia_sdk_root/pkg:sys_cpp",
|
||||
"$fuchsia_sdk_root/pkg:trace",
|
||||
"$fuchsia_sdk_root/pkg:trace-engine",
|
||||
"$fuchsia_sdk_root/pkg:trace-provider-so",
|
||||
"//flutter/shell/platform/fuchsia/dart-pkg/fuchsia",
|
||||
"//flutter/shell/platform/fuchsia/dart-pkg/zircon",
|
||||
"//flutter/shell/platform/fuchsia/runtime/dart/utils",
|
||||
] + flutter_deps
|
||||
|
||||
deps = [
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.accessibility.semantics",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.fonts",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.images",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.intl",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.io",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.ui.scenic",
|
||||
"$fuchsia_sdk_root/pkg:async-cpp",
|
||||
"$fuchsia_sdk_root/pkg:async-default",
|
||||
"$fuchsia_sdk_root/pkg:async-loop",
|
||||
"$fuchsia_sdk_root/pkg:fdio",
|
||||
"$fuchsia_sdk_root/pkg:fidl_cpp",
|
||||
"$fuchsia_sdk_root/pkg:syslog",
|
||||
"$fuchsia_sdk_root/pkg:vfs_cpp",
|
||||
"$fuchsia_sdk_root/pkg:zx",
|
||||
]
|
||||
}
|
||||
|
||||
# Things that explicitly being excluded:
|
||||
# 1. Kernel snapshot framework mode.
|
||||
# 2. Profiler symbols.
|
||||
|
||||
# Builds a flutter_runner
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# output_name (required):
|
||||
# The name of the resulting binary.
|
||||
#
|
||||
# extra_deps (required):
|
||||
# Any additional dependencies.
|
||||
#
|
||||
# product (required):
|
||||
# Whether to link against a Product mode Dart VM.
|
||||
#
|
||||
# extra_defines (optional):
|
||||
# Any additional preprocessor defines.
|
||||
template("flutter_runner") {
|
||||
assert(defined(invoker.output_name), "flutter_runner must define output_name")
|
||||
assert(defined(invoker.extra_deps), "flutter_runner must define extra_deps")
|
||||
assert(defined(invoker.product), "flutter_runner must define product")
|
||||
|
||||
invoker_output_name = invoker.output_name
|
||||
extra_deps = invoker.extra_deps
|
||||
|
||||
extra_configs = []
|
||||
if (is_debug) {
|
||||
extra_configs += [ "//third_party/dart/build/config:debug" ]
|
||||
}
|
||||
|
||||
extra_defines = []
|
||||
if (defined(invoker.extra_defines)) {
|
||||
extra_defines += invoker.extra_defines
|
||||
}
|
||||
|
||||
executable(target_name) {
|
||||
output_name = invoker_output_name
|
||||
|
||||
sources = [
|
||||
"main.cc",
|
||||
]
|
||||
|
||||
configs += extra_configs
|
||||
|
||||
defines = extra_defines
|
||||
|
||||
deps = [ ":flutter_runner_sources" ] + extra_deps
|
||||
|
||||
# The flags below are needed so that Dart's CPU profiler can walk the
|
||||
# C++ stack.
|
||||
cflags = [ "-fno-omit-frame-pointer" ]
|
||||
|
||||
if (!invoker.product) {
|
||||
# This flag is needed so that the call to dladdr() in Dart's native symbol
|
||||
# resolver can report good symbol information for the CPU profiler.
|
||||
ldflags = [ "-rdynamic" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter_runner("jit") {
|
||||
output_name = "flutter_jit_runner"
|
||||
product = false
|
||||
|
||||
extra_defines = []
|
||||
if (flutter_runtime_mode == "profile") {
|
||||
extra_defines = [ "FLUTTER_PROFILE" ]
|
||||
extra_defines += [ "FLUTTER_PROFILE" ]
|
||||
}
|
||||
|
||||
extra_deps = [
|
||||
@ -206,6 +57,7 @@ flutter_runner("aot") {
|
||||
output_name = "flutter_aot_runner"
|
||||
product = false
|
||||
|
||||
extra_defines = []
|
||||
if (flutter_runtime_mode == "profile") {
|
||||
extra_defines += [ "FLUTTER_PROFILE" ]
|
||||
}
|
||||
@ -417,13 +269,41 @@ executable("flutter_runner_unittests") {
|
||||
output_name = "flutter_runner_tests"
|
||||
|
||||
sources = [
|
||||
"accessibility_bridge.cc",
|
||||
"accessibility_bridge.h",
|
||||
"accessibility_bridge_unittest.cc",
|
||||
"component.cc",
|
||||
"component.h",
|
||||
"component_unittest.cc",
|
||||
"flutter_runner_fakes.h",
|
||||
"flutter_runner_product_configuration.cc",
|
||||
"flutter_runner_product_configuration.h",
|
||||
"fuchsia_intl.cc",
|
||||
"fuchsia_intl.h",
|
||||
"fuchsia_intl_unittest.cc",
|
||||
"logging.h",
|
||||
"loop.cc",
|
||||
"loop.h",
|
||||
"platform_view.cc",
|
||||
"platform_view.h",
|
||||
"platform_view_unittest.cc",
|
||||
"runner.cc",
|
||||
"runner.h",
|
||||
"runner_unittest.cc",
|
||||
"surface.cc",
|
||||
"surface.h",
|
||||
"task_observers.cc",
|
||||
"task_observers.h",
|
||||
"task_runner_adapter.cc",
|
||||
"task_runner_adapter.h",
|
||||
"tests/flutter_runner_product_configuration_unittests.cc",
|
||||
"tests/vsync_recorder_unittests.cc",
|
||||
"thread.cc",
|
||||
"thread.h",
|
||||
"vsync_recorder.cc",
|
||||
"vsync_recorder.h",
|
||||
"vsync_waiter.cc",
|
||||
"vsync_waiter.h",
|
||||
"vsync_waiter_unittests.cc",
|
||||
]
|
||||
|
||||
@ -433,7 +313,6 @@ executable("flutter_runner_unittests") {
|
||||
deps = [
|
||||
":aot",
|
||||
":flutter_runner_fixtures",
|
||||
":flutter_runner_sources",
|
||||
"//build/fuchsia/fidl:fuchsia.accessibility.semantics",
|
||||
"//build/fuchsia/pkg:async-default",
|
||||
"//build/fuchsia/pkg:async-loop-cpp",
|
||||
@ -450,10 +329,6 @@ executable("flutter_runner_unittests") {
|
||||
"//third_party/dart/runtime:libdart_jit",
|
||||
"//third_party/dart/runtime/platform:libdart_platform_jit",
|
||||
]
|
||||
|
||||
if (is_debug) {
|
||||
configs += [ "//third_party/dart/build/config:debug" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("flutter_runner_tzdata_unittests") {
|
||||
@ -462,6 +337,8 @@ executable("flutter_runner_tzdata_unittests") {
|
||||
output_name = "flutter_runner_tzdata_tests"
|
||||
|
||||
sources = [
|
||||
"runner.cc",
|
||||
"runner.h",
|
||||
"runner_tzdata_unittest.cc",
|
||||
]
|
||||
|
||||
@ -471,7 +348,6 @@ executable("flutter_runner_tzdata_unittests") {
|
||||
deps = [
|
||||
":aot",
|
||||
":flutter_runner_fixtures",
|
||||
":flutter_runner_sources",
|
||||
"//build/fuchsia/fidl:fuchsia.accessibility.semantics",
|
||||
"//build/fuchsia/pkg:async-loop-cpp",
|
||||
"//build/fuchsia/pkg:async-loop-default",
|
||||
@ -488,10 +364,6 @@ executable("flutter_runner_tzdata_unittests") {
|
||||
"//third_party/icu",
|
||||
"//third_party/skia",
|
||||
]
|
||||
|
||||
if (is_debug) {
|
||||
configs += [ "//third_party/dart/build/config:debug" ]
|
||||
}
|
||||
}
|
||||
|
||||
fuchsia_archive("flutter_runner_tests") {
|
||||
@ -571,8 +443,46 @@ executable("flutter_runner_scenic_unittests") {
|
||||
output_name = "flutter_runner_scenic_tests"
|
||||
|
||||
sources = [
|
||||
"component.cc",
|
||||
"component.h",
|
||||
"compositor_context.cc",
|
||||
"compositor_context.h",
|
||||
"engine.cc",
|
||||
"engine.h",
|
||||
"fuchsia_intl.cc",
|
||||
"fuchsia_intl.h",
|
||||
"isolate_configurator.cc",
|
||||
"isolate_configurator.h",
|
||||
"logging.h",
|
||||
"loop.cc",
|
||||
"loop.h",
|
||||
"platform_view.cc",
|
||||
"platform_view.h",
|
||||
"runner.cc",
|
||||
"runner.h",
|
||||
"session_connection.cc",
|
||||
"session_connection.h",
|
||||
"surface.cc",
|
||||
"surface.h",
|
||||
"task_observers.cc",
|
||||
"task_observers.h",
|
||||
"task_runner_adapter.cc",
|
||||
"task_runner_adapter.h",
|
||||
"tests/session_connection_unittests.cc",
|
||||
"thread.cc",
|
||||
"thread.h",
|
||||
"unique_fdio_ns.h",
|
||||
"vsync_recorder.cc",
|
||||
"vsync_recorder.h",
|
||||
"vsync_waiter.cc",
|
||||
"vsync_waiter.h",
|
||||
"vsync_waiter_unittests.cc",
|
||||
"vulkan_surface.cc",
|
||||
"vulkan_surface.h",
|
||||
"vulkan_surface_pool.cc",
|
||||
"vulkan_surface_pool.h",
|
||||
"vulkan_surface_producer.cc",
|
||||
"vulkan_surface_producer.h",
|
||||
]
|
||||
|
||||
# This is needed for //third_party/googletest for linking zircon symbols.
|
||||
@ -580,9 +490,9 @@ executable("flutter_runner_scenic_unittests") {
|
||||
|
||||
deps = [
|
||||
":flutter_runner_fixtures",
|
||||
":flutter_runner_sources",
|
||||
":jit",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.ui.policy",
|
||||
"$fuchsia_sdk_root/pkg:trace-provider-so",
|
||||
"//build/fuchsia/fidl:fuchsia.accessibility.semantics",
|
||||
"//build/fuchsia/pkg:async-default",
|
||||
"//build/fuchsia/pkg:async-loop-cpp",
|
||||
@ -608,10 +518,6 @@ executable("flutter_runner_scenic_unittests") {
|
||||
public_deps = [
|
||||
"//third_party/googletest:gtest",
|
||||
]
|
||||
|
||||
if (is_debug) {
|
||||
configs += [ "//third_party/dart/build/config:debug" ]
|
||||
}
|
||||
}
|
||||
|
||||
fuchsia_archive("flutter_runner_scenic_tests") {
|
||||
|
||||
150
shell/platform/fuchsia/flutter/engine_flutter_runner.gni
Normal file
150
shell/platform/fuchsia/flutter/engine_flutter_runner.gni
Normal file
@ -0,0 +1,150 @@
|
||||
# Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
assert(is_fuchsia)
|
||||
|
||||
import("//build/fuchsia/sdk.gni")
|
||||
|
||||
# Builds a flutter_runner
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# output_name (required):
|
||||
# The name of the resulting binary.
|
||||
#
|
||||
# extra_deps (required):
|
||||
# Any additional dependencies.
|
||||
#
|
||||
# product (required):
|
||||
# Whether to link against a Product mode Dart VM.
|
||||
#
|
||||
# extra_defines (optional):
|
||||
# Any additional preprocessor defines.
|
||||
template("flutter_runner") {
|
||||
assert(defined(invoker.output_name), "flutter_runner must define output_name")
|
||||
assert(defined(invoker.extra_deps), "flutter_runner must define extra_deps")
|
||||
assert(defined(invoker.product), "flutter_runner must define product")
|
||||
|
||||
invoker_output_name = invoker.output_name
|
||||
extra_deps = invoker.extra_deps
|
||||
|
||||
extra_defines = []
|
||||
if (defined(invoker.extra_defines)) {
|
||||
extra_defines += invoker.extra_defines
|
||||
}
|
||||
|
||||
executable(target_name) {
|
||||
output_name = invoker_output_name
|
||||
|
||||
defines = extra_defines
|
||||
|
||||
libs = []
|
||||
|
||||
sources = [
|
||||
"accessibility_bridge.cc",
|
||||
"accessibility_bridge.h",
|
||||
"component.cc",
|
||||
"component.h",
|
||||
"compositor_context.cc",
|
||||
"compositor_context.h",
|
||||
"engine.cc",
|
||||
"engine.h",
|
||||
"flutter_runner_product_configuration.cc",
|
||||
"flutter_runner_product_configuration.h",
|
||||
"fuchsia_intl.cc",
|
||||
"fuchsia_intl.h",
|
||||
"isolate_configurator.cc",
|
||||
"isolate_configurator.h",
|
||||
"logging.h",
|
||||
"loop.cc",
|
||||
"loop.h",
|
||||
"main.cc",
|
||||
"platform_view.cc",
|
||||
"platform_view.h",
|
||||
"runner.cc",
|
||||
"runner.h",
|
||||
"session_connection.cc",
|
||||
"session_connection.h",
|
||||
"surface.cc",
|
||||
"surface.h",
|
||||
"task_observers.cc",
|
||||
"task_observers.h",
|
||||
"task_runner_adapter.cc",
|
||||
"task_runner_adapter.h",
|
||||
"thread.cc",
|
||||
"thread.h",
|
||||
"unique_fdio_ns.h",
|
||||
"vsync_recorder.cc",
|
||||
"vsync_recorder.h",
|
||||
"vsync_waiter.cc",
|
||||
"vsync_waiter.h",
|
||||
"vulkan_surface.cc",
|
||||
"vulkan_surface.h",
|
||||
"vulkan_surface_pool.cc",
|
||||
"vulkan_surface_pool.h",
|
||||
"vulkan_surface_producer.cc",
|
||||
"vulkan_surface_producer.h",
|
||||
]
|
||||
|
||||
# The use of these dependencies is temporary and will be moved behind the
|
||||
# embedder API.
|
||||
flutter_deps = [
|
||||
"../flutter:fuchsia_legacy_gpu_configuration",
|
||||
"//flutter/assets",
|
||||
"//flutter/common",
|
||||
"//flutter/fml",
|
||||
"//flutter/flow:flow_fuchsia_legacy",
|
||||
"//flutter/lib/ui:ui_fuchsia_legacy",
|
||||
"//flutter/runtime:runtime_fuchsia_legacy",
|
||||
"//flutter/shell/common:common_fuchsia_legacy",
|
||||
"//flutter/vulkan",
|
||||
]
|
||||
|
||||
_fuchsia_platform = "//flutter/shell/platform/fuchsia"
|
||||
|
||||
# TODO(kaushikiska) evaluate if all of these are needed.
|
||||
fuchsia_deps = [
|
||||
"${_fuchsia_platform}/dart-pkg/fuchsia",
|
||||
"${_fuchsia_platform}/dart-pkg/zircon",
|
||||
"${_fuchsia_platform}/runtime/dart/utils",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.accessibility.semantics",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.fonts",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.images",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.intl",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.io",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.sys",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
|
||||
"$fuchsia_sdk_root/fidl:fuchsia.ui.scenic",
|
||||
"$fuchsia_sdk_root/pkg:async-cpp",
|
||||
"$fuchsia_sdk_root/pkg:async-default",
|
||||
"$fuchsia_sdk_root/pkg:async-loop",
|
||||
"$fuchsia_sdk_root/pkg:async-loop-cpp",
|
||||
"$fuchsia_sdk_root/pkg:fdio",
|
||||
"$fuchsia_sdk_root/pkg:fidl_cpp",
|
||||
"$fuchsia_sdk_root/pkg:scenic_cpp",
|
||||
"$fuchsia_sdk_root/pkg:sys_cpp",
|
||||
"$fuchsia_sdk_root/pkg:syslog",
|
||||
"$fuchsia_sdk_root/pkg:trace",
|
||||
"$fuchsia_sdk_root/pkg:trace-engine",
|
||||
"$fuchsia_sdk_root/pkg:trace-provider-so",
|
||||
"$fuchsia_sdk_root/pkg:vfs_cpp",
|
||||
"$fuchsia_sdk_root/pkg:zx",
|
||||
"//third_party/skia",
|
||||
"//flutter/third_party/tonic",
|
||||
] + fuchsia_deps + flutter_deps + extra_deps
|
||||
|
||||
# The flags below are needed so that Dart's CPU profiler can walk the
|
||||
# C++ stack.
|
||||
cflags = [ "-fno-omit-frame-pointer" ]
|
||||
|
||||
if (!invoker.product) {
|
||||
# This flag is needed so that the call to dladdr() in Dart's native symbol
|
||||
# resolver can report good symbol information for the CPU profiler.
|
||||
ldflags = [ "-rdynamic" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -23,10 +23,6 @@ _src_root_dir = os.path.join(_script_dir, '..', '..', '..')
|
||||
_out_dir = os.path.join(_src_root_dir, 'out')
|
||||
_bucket_directory = os.path.join(_out_dir, 'fuchsia_bucket')
|
||||
_fuchsia_base = 'flutter/shell/platform/fuchsia'
|
||||
_default_targets = [
|
||||
'flutter:flutter',
|
||||
'flutter:fuchsia_tests',
|
||||
]
|
||||
|
||||
|
||||
def IsLinux():
|
||||
@ -168,7 +164,8 @@ def CopyIcuDepsToBucket(src, dst):
|
||||
deps_bucket_path = os.path.join(_bucket_directory, dst)
|
||||
FindFileAndCopyTo('icudtl.dat', source_root, deps_bucket_path)
|
||||
|
||||
def BuildBucket(out_dir, runtime_mode, arch, product):
|
||||
def BuildBucket(runtime_mode, arch, product):
|
||||
out_dir = 'fuchsia_%s_%s/' % (runtime_mode, arch)
|
||||
bucket_dir = 'flutter/%s/%s/' % (arch, runtime_mode)
|
||||
deps_dir = 'flutter/%s/deps/' % (arch)
|
||||
CopyToBucket(out_dir, bucket_dir, product)
|
||||
@ -222,7 +219,16 @@ def GetRunnerTarget(runner_type, product, aot):
|
||||
target += 'runner'
|
||||
return base + target
|
||||
|
||||
def BuildTarget(out_dir, runtime_mode, arch, enable_opt, enable_lto, additional_targets=[]):
|
||||
|
||||
def GetTargetsToBuild(product=False, additional_targets=[]):
|
||||
targets_to_build = [
|
||||
'flutter/shell/platform/fuchsia:fuchsia',
|
||||
] + additional_targets
|
||||
return targets_to_build
|
||||
|
||||
|
||||
def BuildTarget(runtime_mode, arch, product, enable_lto, additional_targets=[]):
|
||||
out_dir = 'fuchsia_%s_%s' % (runtime_mode, arch)
|
||||
flags = [
|
||||
'--fuchsia',
|
||||
'--fuchsia-cpu',
|
||||
@ -231,14 +237,11 @@ def BuildTarget(out_dir, runtime_mode, arch, enable_opt, enable_lto, additional_
|
||||
runtime_mode,
|
||||
]
|
||||
|
||||
if not enable_opt:
|
||||
flags.append('--unoptimized')
|
||||
|
||||
if not enable_lto:
|
||||
flags.append('--no-lto')
|
||||
|
||||
RunGN(out_dir, flags)
|
||||
BuildNinjaTargets(out_dir, _default_targets + additional_targets)
|
||||
BuildNinjaTargets(out_dir, GetTargetsToBuild(product))
|
||||
|
||||
return
|
||||
|
||||
@ -266,12 +269,6 @@ def main():
|
||||
parser.add_argument(
|
||||
'--archs', type=str, choices=['x64', 'arm64', 'all'], default='all')
|
||||
|
||||
parser.add_argument(
|
||||
'--unoptimized',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='If set, disables compiler optimizations for the build.')
|
||||
|
||||
parser.add_argument(
|
||||
'--no-lto',
|
||||
action='store_true',
|
||||
@ -298,7 +295,6 @@ def main():
|
||||
runtime_modes = ['debug', 'profile', 'release']
|
||||
product_modes = [False, False, True]
|
||||
|
||||
enable_opt = not args.unoptimized
|
||||
enable_lto = not args.no_lto
|
||||
|
||||
for arch in archs:
|
||||
@ -306,11 +302,10 @@ def main():
|
||||
runtime_mode = runtime_modes[i]
|
||||
product = product_modes[i]
|
||||
if build_mode == 'all' or runtime_mode == build_mode:
|
||||
out_dir = 'fuchsia_%s_%s%s' % (runtime_mode, '' if enable_opt else 'unopt_', arch)
|
||||
if not args.skip_build:
|
||||
BuildTarget(out_dir, runtime_mode, arch, enable_opt, enable_lto,
|
||||
BuildTarget(runtime_mode, arch, product, enable_lto,
|
||||
args.targets.split(","))
|
||||
BuildBucket(out_dir, runtime_mode, arch, product)
|
||||
BuildBucket(runtime_mode, arch, product)
|
||||
|
||||
if args.upload:
|
||||
if args.engine_version is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user