android_kernel_samsung_sm8650/BUILD.bazel
Matthias Maennich 3b77e032e0 ANDROID: Kleaf: use globs to express sources
The updated kernel_build macro requires the usage of glob() to express
the sources involved.

Bug: 189451175
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ib5953fe4ed2c4a219f2296c1991daa317032f64e
2021-06-29 08:45:22 +00:00

73 lines
1.7 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",
"kernel-headers.tar.gz",
"kernel-uapi-headers.tar.gz",
]
aarch64_outs = common_outs + [
"Image",
"Image.lz4",
]
x86_64_outs = common_outs + ["bzImage"]
[kernel_build(
name = name,
outs = outs,
build_config = config,
sources = glob(
["**"],
exclude = [
"android/*",
"BUILD.bazel",
"**/*.bzl",
],
),
) for name, config, outs in [
(
"kernel_aarch64",
"common/build.config.gki.aarch64",
aarch64_outs,
),
(
"kernel_aarch64_debug",
"common/build.config.gki-debug.aarch64",
aarch64_outs,
),
(
"kernel_x86_64",
"common/build.config.gki.x86_64",
x86_64_outs,
),
(
"kernel_x86_64_debug",
"common/build.config.gki-debug.x86_64",
x86_64_outs,
),
]]
alias(
name = "kernel",
actual = ":kernel_aarch64",
)