forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBUILD.gn
113 lines (100 loc) · 3.33 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
107
108
109
110
111
112
113
# Copyright 2018 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.
assert(is_fuchsia)
import("//build/config/fuchsia/fidl_library.gni")
fidl_library("cast_fidl") {
library_name = "cast"
namespace = "chromium"
sources = [
"fidl/cast/api_bindings.fidl",
"fidl/cast/application_config.fidl",
"fidl/cast/queryable_data.fidl",
]
public_deps = [
"//third_party/fuchsia-sdk/sdk:web",
]
}
# DEPRECATED. Use //fuchsia/cipd instead.
# TODO(crbug.com/974363): Remove this.
if (is_official_build) {
group("archive_sources") {
testonly = true
deps = [
":release_archives",
":symbol_tarballs",
]
}
# Location where Fuchsia release archives and supporting files are placed.
_release_artifact_root = "$root_out_dir/fuchsia_artifacts"
# Location where debug symbol tarballs are placed.
_symbol_artifact_root = "$root_out_dir/symbol_artifacts"
# Create a manifest of symbol archives for downstream consumption.
_symbol_tarballs = [
"$root_gen_dir/fuchsia/engine/chromium/chromium.symbols.tar.bz2",
"$root_gen_dir/fuchsia/http/http/http.symbols.tar.bz2",
"$root_gen_dir/fuchsia/runners/cast_runner/cast_runner.symbols.tar.bz2",
"$root_gen_dir/fuchsia/runners/web_runner/web_runner.symbols.tar.bz2",
]
_symbol_manifest = "$target_gen_dir/debug_symbols.json"
_symbol_manifest_contents = []
foreach(_symbol_file, _symbol_tarballs) {
_symbol_manifest_contents += [ get_path_info(_symbol_file, "file") ]
}
write_file(_symbol_manifest, _symbol_manifest_contents, "json")
# Puts copies of files at the top level of the CIPD archive's structure.
copy("release_archives") {
sources = [
"$root_gen_dir/fuchsia/engine/chromium/chromium.far",
"$root_gen_dir/fuchsia/http/http/http.far",
"$root_gen_dir/fuchsia/runners/cast_runner/cast_runner.far",
"$root_gen_dir/fuchsia/runners/web_runner/web_runner.far",
]
outputs = [
"$_release_artifact_root/{{source_file_part}}",
]
deps = [
"//fuchsia/engine:web_engine",
"//fuchsia/http:http_pkg",
"//fuchsia/runners:cast_runner_pkg",
"//fuchsia/runners:web_runner_pkg",
]
}
copy("symbol_tarballs") {
sources = [
_symbol_manifest,
"${root_gen_dir}/fuchsia/cipd/build_id.txt",
"${root_gen_dir}/fuchsia/cipd/LICENSE",
] + _symbol_tarballs
outputs = [
"$_symbol_artifact_root/{{source_file_part}}",
]
deps = [
"//fuchsia/cipd:build_id",
"//fuchsia/cipd:license",
"//fuchsia/engine:symbol_archive",
"//fuchsia/http:symbol_archive",
"//fuchsia/runners:cast_runner_symbol_archive",
"//fuchsia/runners:web_runner_symbol_archive",
]
}
} # is_official_build
# Used by the top-level "gn_all" target to discover Fuchsia build targets.
group("gn_all") {
testonly = true
deps = [
"base:cr_fuchsia_base_unittests",
"engine:web_engine",
"engine:web_engine_browsertests",
"engine:web_engine_unittests",
"http:http_service_tests",
"mojo:fuchsia_mojo_unittests",
"runners:cast_runner",
"runners:cast_runner_browsertests",
"runners:web_runner",
"//chromecast/bindings:bindings_manager_fuchsia",
]
if (is_official_build) {
deps += [ "cipd" ]
}
}