1# Copyright (C) 2023 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("@gbl//toolchain:gbl_toolchain.bzl", "link_static_cc_library")
16
17package(
18    default_visibility = ["//visibility:public"],
19)
20
21exports_files(glob(["**/*"]))
22
23cc_library(
24    name = "asm_macros_common",
25    hdrs = ["include/common/asm_macros_common.S"],
26    includes = ["include"],
27)
28
29cc_library(
30    name = "aarch64_cache_helper",
31    srcs = [
32        "disable_cache_mmu.S",
33        "@arm_trusted_firmware//:lib/aarch64/cache_helpers.S",
34    ],
35    hdrs = ["@arm_trusted_firmware//:include/arch/aarch64/asm_macros.S"],
36    defines = ["__ASSEMBLER__"],
37    deps = [
38        ":asm_macros_common",
39        "@arm_trusted_firmware//:headers_aarch64",
40    ],
41)
42
43link_static_cc_library(
44    name = "aarch64_cache_helper_staticlib",
45    cc_library = ":aarch64_cache_helper",
46)
47