linux/BUILD.bazel
Matthias Maennich c7ca969870 ANDROID: Kleaf: adopt new way of expressing the build config
Build config files can now be expressed as files relative to the
BUILD.bazel file. That makes this mechanism much more portable.

Bug: 192656402
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Iefa7277f21e9412e71c9738664d006246b05be6e
2021-07-14 17:42:33 +01:00

71 lines
1.6 KiB
Python

# Copyright (C) 2021 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/kleaf:kernel.bzl", "kernel_build")
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",
)