Skip to content

Commit

Permalink
build_slider: Don't allow BUILD_KERNEL=0 and GKI_DEFCONFIG_FRAGMENT
Browse files Browse the repository at this point in the history
The prebuilts do not have any GKI_DEFCONFIG_FRAGMENT; allowing this
combination of flags would result in an invalid build. This, however, is
possible if the user explicitly sets BUILD_KERNEL=0. Throw an error if
this is attempted.

Bug: 184667897
Signed-off-by: J. Avila <[email protected]>
Change-Id: Ic7c000b60559318a17ad07dd00f2a37c77060f4c
  • Loading branch information
J. Avila committed Apr 30, 2021
1 parent 54b3d09 commit 768dbcc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions build_slider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,18 @@ if [ -n "${BUILD_CONFIG}" ]; then
exit_if_error 1 "BUILD_CONFIG is not supported for $0"
fi

if [ "${BUILD_KERNEL}" = "0" -a "${EXPERIMENTAL_BUILD}" != "0" ]; then
exit_if_error 1 "BUILD_KERNEL=0 is incompatible with EXPERIMENTAL_BUILD"
fi

if [ "${LTO}" = "none" -a "${BUILD_KERNEL}" = "0" ]; then
exit_if_error 1 "LTO=none requires BUILD_KERNEL=1 or EXPERIMENTAL_BUILD=1"
if [ "${BUILD_KERNEL}" = "0" ]; then
if [ "${EXPERIMENTAL_BUILD}" != "0" -o -n "${GKI_DEFCONFIG_FRAGMENT}" ]; then
echo "BUILD_KERNEL=0 is incompatible with EXPERIMENTAL_BUILD=1 and"
echo " GKI_DEFCONFIG_FRAGMENT."
exit_if_error 1 "Flags incompatible with BUILD_KERNEL=0 detected"
elif [ "${LTO}" = "none" ]; then
echo "LTO=none requires BUILD_KERNEL=1, EXPERIMENTAL_BUILD=1, or"
echo " GKI_DEFCONFIG_FRAGMENT to be set."
exit_if_error 1 "LTO=none requires building the kernel"
fi
fi


if [ "${EXPERIMENTAL_BUILD}" = "0" -a "${BUILD_KERNEL}" != "0" ]; then
pushd aosp/ > /dev/null
# Booting AOSP ToT does not always work; throw a warning to prevent this.
Expand Down

0 comments on commit 768dbcc

Please sign in to comment.