ANDROID: Add aarch64 kernel target with AutoFDO profile

Bug: 382743224
Test: build
Change-Id: I4ed5d5b23cc4f84452526d87c8ca35c1c25d7039
Signed-off-by: Yabin Cui <yabinc@google.com>
This commit is contained in:
Yabin Cui
2024-12-16 16:09:12 -08:00
committed by Treehugger Robot
parent a3040de297
commit 6c0d1f4500
+22
View File
@@ -4,6 +4,7 @@
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@kernel_toolchain_info//:dict.bzl", "BRANCH")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_pkg//pkg:install.bzl", "pkg_install")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
@@ -251,6 +252,27 @@ common_kernel(
visibility = ["//visibility:public"],
)
common_kernel(
name = "kernel_aarch64_autofdo",
outs = DEFAULT_GKI_OUTS,
arch = "arm64",
build_gki_artifacts = True,
clang_autofdo_profile = "//toolchain/pgo-profiles/kernel:aarch64/" + BRANCH + "/kernel.afdo",
ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive",
ddk_module_headers = [":all_headers_aarch64"],
defconfig = "arch/arm64/configs/gki_defconfig",
extra_dist = [
":test_mappings_zip",
":tests_zip_arm64",
],
gki_boot_img_sizes = _GKI_AARCH64_BOOT_IMAGE_SIZES,
gki_system_dlkm_modules = ":gki_system_dlkm_modules_arm64",
make_goals = _GKI_AARCH64_MAKE_GOALS,
makefile = ":Makefile",
module_implicit_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64"),
visibility = ["//visibility:public"],
)
fail_rule(
name = "kernel_x86_64_debug",
message = """\