ANDROID: kleaf: add DDK definitions for risc64

Bug: 260012551
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I6d6e90f927796d1355af3ad181624b7abd876a9a
This commit is contained in:
Alistair Delva 2022-12-08 13:20:51 -08:00
parent d0da01fd61
commit 93e1118c79

View File

@ -379,6 +379,15 @@ ddk_headers(
visibility = ["//visibility:public"],
)
ddk_headers(
name = "all_headers_riscv64",
hdrs = [":all_headers_allowlist_riscv64"] + select({
"//build/kernel/kleaf:allow_ddk_unsafe_headers_set": [":all_headers_unsafe"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
)
ddk_headers(
name = "all_headers_x86_64",
hdrs = [":all_headers_allowlist_x86_64"] + select({
@ -429,6 +438,24 @@ ddk_headers(
visibility = ["//visibility:private"],
)
ddk_headers(
name = "all_headers_allowlist_riscv64",
hdrs = [
":all_headers_allowlist_common_globs",
":all_headers_allowlist_riscv64_globs",
],
# The list of include directories where source files can #include headers
# from. In other words, these are the `-I` option to the C compiler.
# These are prepended to LINUXINCLUDE.
linux_includes = [
"arch/riscv/include",
"arch/riscv/include/uapi",
"include",
"include/uapi",
],
visibility = ["//visibility:private"],
)
ddk_headers(
name = "all_headers_allowlist_x86_64",
hdrs = [
@ -453,6 +480,13 @@ ddk_headers(
# These are separate filegroup targets so the all_headers_allowlist_* are
# more friendly to batch BUILD file update tools like buildozer.
# globs() for arm64 only
filegroup(
name = "all_headers_allowlist_aarch64_globs",
srcs = glob(["arch/arm64/include/**/*.h"]),
visibility = ["//visibility:private"],
)
# globs() for arm only
filegroup(
name = "all_headers_allowlist_arm_globs",
@ -460,10 +494,10 @@ filegroup(
visibility = ["//visibility:private"],
)
# globs() for arm64 only
# globs() for riscv64 only
filegroup(
name = "all_headers_allowlist_aarch64_globs",
srcs = glob(["arch/arm64/include/**/*.h"]),
name = "all_headers_allowlist_riscv64_globs",
srcs = glob(["arch/riscv/include/**/*.h"]),
visibility = ["//visibility:private"],
)