forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
106 lines (90 loc) · 3.15 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 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.
import("//third_party/dart/utils/application_snapshot.gni")
# TODO(kaushikiska@): Leaving this here to make it a soft-transition
# Remove this once we no longer need engine sources in fuchsia/topaz.
if (is_fuchsia_host || is_fuchsia) {
import("//build/dart/dart_library.gni")
import("//build/dart/dart_tool.gni")
dart_library("flutter_frontend_server") {
disable_analysis = true
package_name = "flutter_frontend_server"
sources = [
"server.dart",
]
deps = [
"//third_party/dart-pkg/pub/args",
"//third_party/dart-pkg/pub/cli_util",
"//third_party/dart-pkg/pub/path",
"//third_party/dart-pkg/pub/source_maps",
"//third_party/dart-pkg/pub/usage",
"//third_party/dart/pkg/analyzer",
"//third_party/dart/pkg/build_integration",
"//third_party/dart/pkg/dev_compiler",
"//third_party/dart/pkg/front_end",
"//third_party/dart/pkg/frontend_server",
"//third_party/dart/pkg/kernel",
"//third_party/dart/pkg/vm",
]
}
dart_tool("frontend_server_tool") {
main_dart = "bin/starter.dart"
source_dir = "."
disable_analysis = true
output_name = "frontend_server"
sources = []
deps = [
":flutter_frontend_server",
]
}
}
frontend_server_files =
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("."),
],
"list lines")
frontend_server_files +=
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("../../third_party/dart/pkg"),
],
"list lines")
application_snapshot("frontend_server") {
main_dart = "bin/starter.dart"
deps = [
":package_incremental_compiler",
"$flutter_root/lib/snapshot:kernel_platform_files",
]
dot_packages = rebase_path(".packages")
flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk")
training_args = [
"--train",
"--sdk-root=$flutter_patched_sdk",
rebase_path(main_dart),
]
inputs = frontend_server_files
}
# For flutter/flutter#36738 we make the source files available so that
# we can generate a local frontend_server snapshot in the tools cache.
action("package_incremental_compiler") {
script = "$flutter_root/flutter_frontend_server/package_incremental.py"
inputs = frontend_server_files
outputs = [
"$root_gen_dir/dart-pkg/flutter_frontend_server/pubspec.yaml",
"$root_gen_dir/dart-pkg/vm/pubspec.yaml",
"$root_gen_dir/dart-pkg/build_integration/pubspec.yaml",
"$root_gen_dir/dart-pkg/front_end/pubspec.yaml",
"$root_gen_dir/dart-pkg/kernel/pubspec.yaml",
"$root_gen_dir/dart-pkg/dev_compiler/pubspec.yaml",
"$root_gen_dir/dart-pkg/frontend_server/pubspec.yaml",
]
args = [
"--input-root=" + rebase_path("//third_party/dart/pkg"),
"--output-root=" + rebase_path("$root_gen_dir/dart-pkg"),
"--frontend-server=" + rebase_path("$flutter_root"),
]
}