ANDROID: Kleaf: use 'define_common_kernels()' macro

Using the macro avoids duplication and boilerplate across branches.

Bug: 192655270
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ie0034ae396baaaaf07035c3532b71a70918e0aba
This commit is contained in:
Matthias Maennich
2021-08-13 12:50:07 +01:00
parent eba773ab53
commit d04a5c4694
+2 -55
View File
@@ -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()