From d04a5c469488d2005c605fab95c573d846082345 Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Fri, 13 Aug 2021 12:50:07 +0100 Subject: [PATCH] ANDROID: Kleaf: use 'define_common_kernels()' macro Using the macro avoids duplication and boilerplate across branches. Bug: 192655270 Signed-off-by: Matthias Maennich Change-Id: Ie0034ae396baaaaf07035c3532b71a70918e0aba --- BUILD.bazel | 57 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 9ef548ced327..376d3fe2767e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -12,59 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("//build/kleaf:kernel.bzl", "kernel_build") +load("//build/kleaf:common_kernels.bzl", "define_common_kernels") -common_outs = [ - "System.map", - "modules.builtin", - "modules.builtin.modinfo", - "vmlinux", - "vmlinux.symvers", -] - -aarch64_outs = common_outs + [ - "Image", - "Image.lz4", -] - -x86_64_outs = common_outs + ["bzImage"] - -[kernel_build( - name = name, - srcs = glob( - ["**"], - exclude = [ - "android/*", - "BUILD.bazel", - "**/*.bzl", - ], - ), - outs = outs, - build_config = config, -) for name, config, outs in [ - ( - "kernel_aarch64", - "build.config.gki.aarch64", - aarch64_outs, - ), - ( - "kernel_aarch64_debug", - "build.config.gki-debug.aarch64", - aarch64_outs, - ), - ( - "kernel_x86_64", - "build.config.gki.x86_64", - x86_64_outs, - ), - ( - "kernel_x86_64_debug", - "build.config.gki-debug.x86_64", - x86_64_outs, - ), -]] - -alias( - name = "kernel", - actual = ":kernel_aarch64", -) +define_common_kernels()