| # Copyright 2023 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/toolchain/zircon/user_basic_redirect.gni") |
| import("//build/zircon/embedded_blob.gni") |
| import("//build/zircon/hermetic_code_blob.gni") |
| |
| user_basic_redirect("restricted-blob") { |
| visibility = [ "../*" ] |
| testonly = true |
| |
| # The embedded blob is built in the user.basic environment too. It doesn't |
| # really matter that it is, but it makes it easier to have it depend on the |
| # hermetic_code_blob() target that needs to be compiled in user.basic. |
| public_deps = [ ":write_to_stack.blob" ] |
| } |
| |
| hermetic_code_blob("write_to_stack") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| entrypoint = "write_to_stack" |
| |
| sources = [ "$current_cpu.S" ] |
| deps = [ "//zircon/kernel/lib/arch" ] |
| } |
| |
| # This is evaluated in the user.basic toolchain so that it can use |
| # get_target_outputs. |
| embedded_blob("write_to_stack.blob") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| output_name = "write_to_stack" |
| deps = [ ":write_to_stack" ] |
| sources = get_target_outputs(deps[0]) |
| } |