| # Copyright 2020 The Fuchsia Authors |
| # |
| # Use of this source code is governed by a MIT-style |
| # license that can be found in the LICENSE file or at |
| # https://opensource.org/licenses/MIT |
| |
| import("//build/cpp/library_headers.gni") |
| import("//build/toolchain/toolchain_environment.gni") |
| import("//zircon/system/ulib/hwreg/hwreg_asm_header.gni") |
| |
| library_headers("headers") { |
| visibility = [ "../*" ] |
| |
| headers = [] |
| public_deps = [ |
| ":gen-arm64-system-asm", |
| "//zircon/system/ulib/hwreg:headers", |
| |
| # <lib/arch/internal/zbi-constants.h> has #include <fidl/zbi/data/asm/zbi.h> |
| "//sdk/fidl/zbi:zbi_zither.asm", |
| |
| # <lib/arch/zbi-boot.h> has #include <lib/zbi-format/zbi.h>. |
| # <lib/arch/internal/zbi-constants.h> has #include <lib/zbi-format/zbi.h>. |
| "//sdk/lib/zbi-format", |
| ] |
| } |
| |
| static_library("arm64") { |
| visibility = [ "../*" ] |
| |
| public_deps = [ ":headers" ] |
| |
| include_dirs = [ |
| "include", |
| "../include", |
| ] |
| |
| sources = [ "shadow-call-stack.S" ] |
| |
| if (is_kernel) { |
| sources += [ |
| "cache-ops.S", |
| "cache.cc", |
| "drop-el3.cc", |
| ] |
| |
| deps = [ |
| ":gen-arm64-system-asm", |
| ":random", |
| ] |
| } |
| } |
| |
| source_set("random") { |
| visibility = [ ":*" ] |
| |
| include_dirs = [ |
| "include", |
| "../include", |
| ] |
| deps = [ "//zircon/system/ulib/hwreg" ] |
| |
| sources = [ "random.cc" ] |
| |
| configs += [ ":random.config" ] |
| } |
| |
| config("random.config") { |
| visibility = [ ":*" ] |
| cflags = [ "-march=armv8.5-a+rng" ] |
| } |
| |
| hwreg_asm_header("gen-arm64-system-asm") { |
| visibility = [ ":*" ] |
| output_name = "lib/arch/arm64/system-asm.h" |
| defines = [ "LIB_ARCH_PRINTERS" ] |
| sources = [ "gen-arm64-system-asm.cc" ] |
| deps = [ ".." ] |
| } |