forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
106 lines (95 loc) · 2.8 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//dart/runtime/bin/vmservice/vmservice_sources.gni")
import("//flutter/common/config.gni")
action("gen_embedded_resources_cc") {
script = "//dart/runtime/tools/create_resources.py"
output_file = "$target_gen_dir/embedded_resources.cc"
outputs = [
output_file,
]
inputs = rebase_path(vmservice_sources,
"",
"//dart/runtime/bin/vmservice")
args = [
"--output",
rebase_path(output_file),
"--outer_namespace",
"flutter",
"--inner_namespace",
"runtime",
"--table_name",
"flutter_embedded_service_isolate",
"--root_prefix",
rebase_path("//dart/runtime/bin/"),
] + rebase_path(inputs)
}
source_set("embedded_resources_cc") {
sources = [
"$target_gen_dir/embedded_resources.cc",
]
deps = [
":gen_embedded_resources_cc",
]
}
source_set("runtime") {
sources = [
"asset_font_selector.cc",
"asset_font_selector.h",
"dart_controller.cc",
"dart_controller.h",
"dart_init.cc",
"dart_init.h",
"dart_service_isolate.cc",
"dart_service_isolate.h",
"embedder_resources.cc",
"embedder_resources.h",
"platform_impl.cc",
"platform_impl.h",
"runtime_controller.cc",
"runtime_controller.h",
"runtime_delegate.cc",
"runtime_delegate.h",
"runtime_init.cc",
"runtime_init.h",
"start_up.cc",
"start_up.h",
"test_font_data.cc",
"test_font_data.h",
"test_font_selector.cc",
"test_font_selector.h",
]
deps = [
":embedded_resources_cc",
"//dart/runtime:dart_api",
"//dart/runtime/bin:embedded_dart_io",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
"//flutter/glue",
"//flutter/lib/io",
"//flutter/lib/ui",
"//flutter/sky/engine/platform",
"//lib/ftl",
"//lib/tonic",
"//third_party/rapidjson",
"//third_party/skia",
]
defines = []
if (flutter_runtime_mode == "debug" || current_toolchain == host_toolchain) {
# Though the test font data is small, we dont want to add to the binary size
# on the device (in profile and release modes). We only add the same on the
# host test shells and the debug device shell.
defines += [ "EMBED_TEST_FONT_DATA=1" ]
}
if (flutter_runtime_mode != "release") {
deps += [ "//lib/tonic/debugger" ]
}
# In AOT mode, precompiled snapshots contain the instruction buffer.
# Generation of the same requires all application specific script code to be
# specified up front. In such cases, there can be no generic snapshot.
if (!flutter_aot) {
deps += [ "//flutter/lib/snapshot" ]
}
}