| # 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. |
| |
| # This file lives at //build/zircon/template.gn; ONLY EDIT IT BY THAT NAME! |
| # This file is hard-linked to various //zircon/public/*/BUILD.gn files. |
| # See //zircon/public/README.md for details. |
| |
| # Please do not remove the "ONLY EDIT IT BY THAT NAME!" bit as it is used as a |
| # marker to determine whether a build file was derived from the present file. |
| # There, here's another one to be really sure: ONLY EDIT IT BY THAT NAME! |
| |
| import("//build/config/fuchsia/zircon_legacy_vars.gni") |
| |
| dir = get_label_info(".", "name") |
| zircon_public = get_label_info("..", "name") |
| |
| dir_target = false |
| foreach(target, zircon_legacy_targets) { |
| if (target.target_name == dir && target._zircon_public == zircon_public) { |
| assert(dir_target == false, |
| "$dir appears twice in Zircon legacy_targets metadata:" + |
| " $dir_target vs $target") |
| dir_target = target |
| } |
| } |
| |
| assert(dir_target != false, "Could not find $dir in Zircon legacy metadata") |
| |
| import(dir_target.import) |
| |
| target(dir_target.target_type, dir) { |
| forward_variables_from(dir_target, |
| "*", |
| [ |
| "import", |
| "target_name", |
| "target_type", |
| ]) |
| } |