blob: 56841a8a8dd4b475d7174d24b4ae337892e0999f [file] [log] [blame]
# 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/application_controller.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",
"mojom:fuchsia_mojo_unittests",
"runners:cast_runner",
"runners:cast_runner_browsertests",
"runners:cast_runner_integration_tests",
"runners:cast_runner_unittests",
"runners:web_runner",
"//chromecast/bindings:bindings_manager_fuchsia",
]
if (is_official_build) {
deps += [ "cipd" ]
}
}