android_kernel_samsung_sm8650/msm_abl.bzl
John Moon 515dc189be build: Unify output directory format
Currently, the Bazel build output directory format differs from
legacy build.sh in that it replaces underscores directory name to
hyphens.

This behavior is undesirable, so refactor the output directory name
logic to be consistent with legacy build.sh:

out/msm-kernel-<target>-<variant> where words in the target and
variant are underscore-delimited.

Change-Id: Ia60076dd613fc034888703f10d5dc836b34c317b
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-01-18 17:14:58 -08:00

23 lines
675 B
Python

load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir")
load(":msm_common.bzl", "get_out_dir")
def define_abl_dist(target, msm_target, variant):
"""Creates ABL distribution target
Args:
target: name of main Bazel target (e.g. `kalama_gki`)
"""
native.alias(
name = "{}_abl".format(target),
actual = "//bootable/bootloader/edk2:{}_abl".format(target),
)
copy_to_dist_dir(
name = "{}_abl_dist".format(target),
archives = ["{}_abl".format(target)],
dist_dir = "{}/dist".format(get_out_dir(msm_target, variant)),
flat = True,
wipe_dist_dir = False,
log = "info",
)