blob: 35015211fdcb261bc23754f0abc54b8478778514 [file] [log] [blame]
# 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.
import("//build/host.gni")
import("//build/compiled_action.gni")
import("//build/config/fuchsia/zircon.gni")
executable("fidlgen_llcpp_zircon") {
sources = [
"llcpp_codegen.cc",
"llcpp_codegen.h",
"main.cc",
]
deps = [ "//third_party/rapidjson" ]
}
foreach(command, [ "validate", "update" ]) {
compiled_action(command) {
tool = ":fidlgen_llcpp_zircon"
args = [
command,
rebase_path(zircon_root_build_dir, root_build_dir),
rebase_path("$root_build_dir/tools/fidlgen_llcpp", root_build_dir),
rebase_path("$target_gen_dir/fidlgen_llcpp_zircon_${command}.stamp", root_build_dir),
rebase_path("$target_gen_dir/fidlgen_llcpp_zircon_${command}.d", root_build_dir),
rebase_path("$target_gen_dir/validator_tmp", root_build_dir)
]
# This dependency delivers $root_build_dir/tools/fidlgen_llcpp.
# It doesn't have to appear in inputs, because the tool will output
# the exact path to fidlgen_llcpp in the depfile.
deps = [ "//garnet/go/src/fidl" ]
depfile = "$target_gen_dir/fidlgen_llcpp_zircon_${command}.d"
inputs = [ "$zircon_root_build_dir/fidl_gen.json" ]
outputs = [ "$target_gen_dir/fidlgen_llcpp_zircon_${command}.stamp" ]
}
}