From 06b7e204a9de0aff447f4212d43fe6ca55b01e28 Mon Sep 17 00:00:00 2001 From: HONG Yifan Date: Tue, 20 Aug 2024 16:27:18 -0700 Subject: [PATCH] ANDROID: Move kythe & compile_commands out of common_kernels(). Further unroll the macro. These are public targets. This reduces the number of targets defined and unused for debug, 16k etc. Bug: 256196254 Change-Id: I037de9d8a4a2df2b9153d38ffa6c683df733b82a Signed-off-by: HONG Yifan --- BUILD.bazel | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 58db197d8394..bd7368920b78 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -24,7 +24,9 @@ load( "ddk_headers", "ddk_headers_archive", "kernel_build", + "kernel_compile_commands", "kernel_images", + "kernel_kythe", "kernel_modules_install", "merge_kzip", "merged_kernel_uapi_headers", @@ -292,12 +294,56 @@ alias( visibility = ["//visibility:public"], ) +kernel_compile_commands( + name = "kernel_aarch64_compile_commands", + visibility = ["//visibility:public"], + deps = [":kernel_aarch64"], +) + +kernel_compile_commands( + name = "kernel_x86_64_compile_commands", + visibility = ["//visibility:public"], + deps = [":kernel_x86_64"], +) + string_flag( name = "kernel_kythe_corpus", build_setting_default = "", visibility = ["//visibility:public"], ) +kernel_kythe( + name = "kernel_aarch64_kythe", + corpus = ":kernel_kythe_corpus", + kernel_build = ":kernel_aarch64", + visibility = ["//visibility:public"], +) + +copy_to_dist_dir( + name = "kernel_aarch64_kythe_dist", + data = [ + ":kernel_aarch64_kythe", + ], + flat = True, + visibility = ["//visibility:public"], +) + +kernel_kythe( + name = "kernel_x86_64_kythe", + corpus = ":kernel_kythe_corpus", + kernel_build = ":kernel_x86_64", + visibility = ["//visibility:public"], +) + +copy_to_dist_dir( + name = "kernel_x86_64_kythe_dist", + data = [ + ":kernel_x86_64_kythe", + ], + flat = True, + visibility = ["//visibility:public"], +) + merge_kzip( name = "kernel_kythe", srcs = [