| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This BUILD.gn file is not intended to work standalone. It is meant to be used |
| # when this repository is imported in the Fuchsia build. |
| |
| import("//build/compiled_action.gni") |
| |
| # Build a protocol buffer binary for fuchsia describing the cobalt |
| # configuration. |
| |
| compiled_action("cobalt_config") { |
| # This target refers to the configuration parser as checked out in the |
| # Fuchsia build. |
| tool = "//third_party/cobalt/config/config_parser/src:bin" |
| tool_output_name = "config_parser" |
| |
| config_validator_target = |
| "//third_party/cobalt/config/validation:validate($host_toolchain)" |
| config_validator_bin = |
| get_label_info(config_validator_target, "root_out_dir") + "/validate" |
| |
| deps = [ |
| config_validator_target, |
| ] |
| |
| depfile = "$target_gen_dir/cobalt_config.d" |
| outputs = [ |
| "$target_gen_dir/cobalt_config.binproto", |
| ] |
| inputs = [ |
| "projects.yaml", |
| config_validator_bin, |
| ] |
| args = [ |
| "-output_file", |
| rebase_path(outputs[0], root_build_dir), |
| "-dep_file", |
| rebase_path(depfile, root_build_dir), |
| "-config_dir", |
| rebase_path(".", root_build_dir), |
| "-config_validator_bin", |
| rebase_path(config_validator_bin, root_build_dir), |
| "-logtostderr", |
| ] |
| } |