blob: 8935cf7b0057cb0dffc0e060c017508816d383cb [file] [log] [blame]
# Copyright 2019 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.
template("stats") {
not_needed(invoker, [])
rule_name = target_name
file_stem = "${target_gen_dir}/${target_name}"
action("${rule_name}_gen") {
script="${rule_name}.py"
inputs=["statsc.py"]
outputs=[
"${file_stem}.cc",
"${file_stem}.h",
]
args=["--stem", rebase_path(file_stem, root_build_dir)]
}
source_set(rule_name) {
sources=[
"${file_stem}.cc",
"${file_stem}.h",
]
public_deps=[
":${rule_name}_gen",
":visitor",
]
}
}
stats("link") {}
group("lib") {
public_deps = [
":link",
]
}
source_set("visitor") {
sources = [
"visitor.h",
]
}