forked from LineageOS/android_build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'android-14.0.0_r29' into staging/lineage-21.0_merge-androi…
…d-14.0.0_r29 Android 14.0.0 release 29 # -----BEGIN PGP SIGNATURE----- # # iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZeZWvgAKCRDorT+BmrEO # ePd2AJ9htACMoS+nNDu9IpJB05WiR/NyHQCfUzBaEyDH9yCqHQo7CPiXkHtOqks= # =iWeA # -----END PGP SIGNATURE----- # gpg: Signature made Tue Mar 5 01:18:22 2024 EET # gpg: using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78 # gpg: Good signature from "The Android Open Source Project <[email protected]>" [marginal] # gpg: [email protected]: Verified 2332 signatures in the past # 2 years. Encrypted 4 messages in the past 2 years. # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 4340 D135 70EF 945E 8381 0964 E8AD 3F81 9AB1 0E78 # By Android Build Coastguard Worker (175) and others # Via Automerger Merge Worker (5473) and others * tag 'android-14.0.0_r29': (1001 commits) Version bump to AP1A.240305.019.A1 [core/build_id.mk] Version bump to AP1A.240305.019 [core/build_id.mk] Version bump to AP1A.240305.018.X1 [core/build_id.mk] Version bump to AP1A.240305.018 [core/build_id.mk] Version bump to AP1A.240305.017 [core/build_id.mk] Version bump to AP1A.240305.016 [core/build_id.mk] Version bump to AP1A.240305.015 [core/build_id.mk] Version bump to AP1A.240305.014 [core/build_id.mk] Version bump to AP1A.240305.013 [core/build_id.mk] Version bump to AP1A.240305.012 [core/build_id.mk] Version bump to AP1A.240305.011 [core/build_id.mk] Version bump to AP1A.240305.010 [core/build_id.mk] Version bump to AP1A.240305.009 [core/build_id.mk] Move RELEASE_PLATFORM_VERSION_KNOWN_CODENAMES out to release configs. Version bump to AP1A.240305.007.X1 [core/build_id.mk] Version bump to AP1A.240305.007 [core/build_id.mk] Version bump to AP1A.240305.006 [core/build_id.mk] Version bump to AP1A.240305.005.Y1 [core/build_id.mk] Version bump to AP1A.240305.005.X1 [core/build_id.mk] Version bump to AP1A.240305.005 [core/build_id.mk] ... Conflicts: core/Makefile core/build_id.mk core/soong_config.mk core/sysprop.mk core/version_defaults.mk envsetup.sh target/board/BoardConfigEmuCommon.mk tools/releasetools/common.py tools/releasetools/ota_from_target_files.py Change-Id: I3794e958f4f4231120fdd866fa68c27ef872d279
- Loading branch information
Showing
335 changed files
with
14,399 additions
and
4,723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,42 @@ | ||
# Build System Changes for Android.mk Writers | ||
# Build System Changes for Android.mk/Android.bp Writers | ||
|
||
## Soong genrules are now sandboxed | ||
|
||
Previously, soong genrules could access any files in the source tree, without specifying them as | ||
inputs. This makes them incorrect in incremental builds, and incompatible with RBE and Bazel. | ||
|
||
Now, genrules are sandboxed so they can only access their listed srcs. Modules denylisted in | ||
genrule/allowlists.go are exempt from this. You can also set `BUILD_BROKEN_GENRULE_SANDBOXING` | ||
in board config to disable this behavior. | ||
|
||
## Partitions are no longer affected by previous builds | ||
|
||
Partition builds used to include everything in their staging directories, and building an | ||
individual module will install it to the staging directory. Thus, previously, `m mymodule` followed | ||
by `m` would cause `mymodule` to be presinstalled on the device, even if it wasn't listed in | ||
`PRODUCT_PACKAGES`. | ||
|
||
This behavior has been changed, and now the partition images only include what they'd have if you | ||
did a clean build. This behavior can be disabled by setting the | ||
`BUILD_BROKEN_INCORRECT_PARTITION_IMAGES` environment variable or board config variable. | ||
|
||
Manually adding make rules that build to the staging directories without going through the make | ||
module system will not be compatible with this change. This includes many usages of | ||
`LOCAL_POST_INSTALL_CMD`. | ||
|
||
## Perform validation of Soong plugins | ||
|
||
Each Soong plugin will require manual work to migrate to Bazel. In order to | ||
minimize the manual work outside of build/soong, we are restricting plugins to | ||
those that exist today and those in vendor or hardware directories. | ||
|
||
If you need to extend the build system via a plugin, please reach out to the | ||
build team via email [email protected] (external) for any | ||
questions, or see [go/soong](http://go/soong) (internal). | ||
|
||
To omit the validation, `BUILD_BROKEN_PLUGIN_VALIDATION` expects a | ||
space-separated list of plugins to omit from the validation. This must be set | ||
within a product configuration .mk file, board config .mk file, or buildspec.mk. | ||
|
||
## Python 2 to 3 migration | ||
|
||
|
@@ -493,6 +531,24 @@ $(call dist-for-goals,foo,bar/baz) | |
|
||
will copy `bar/baz` into `$DIST_DIR/baz` when `m foo dist` is run. | ||
|
||
#### FILE_NAME_TAG {#FILE_NAME_TAG} | ||
|
||
To embed the `BUILD_NUMBER` (or for local builds, `eng.${USER}`), include | ||
`FILE_NAME_TAG_PLACEHOLDER` in the destination: | ||
|
||
``` make | ||
# you can use dist-for-goals-with-filenametag function | ||
$(call dist-for-goals-with-filenametag,foo,bar.zip) | ||
# or use FILE_NAME_TAG_PLACEHOLDER manually | ||
$(call dist-for-goals,foo,bar.zip:baz-FILE_NAME_TAG_PLACEHOLDER.zip) | ||
``` | ||
|
||
Which will produce `$DIST_DIR/baz-1234567.zip` on build servers which set | ||
`BUILD_NUMBER=1234567`, or `$DIST_DIR/baz-eng.builder.zip` for local builds. | ||
If you just want to append `BUILD_NUMBER` at the end of basename, use | ||
`dist-for-goals-with-filenametag` instead of `dist-for-goals`. | ||
#### Renames during copy | ||
Instead of specifying just a file, a destination name can be specified, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ include platform/build/soong:/OWNERS | |
|
||
# Since this file affects all Android developers, lock it down. There is still | ||
# round the world timzeone coverage. | ||
per-file envsetup.sh = [email protected], [email protected], [email protected] | ||
per-file shell_utils.sh = [email protected], [email protected], [email protected] | ||
per-file envsetup.sh = [email protected], [email protected] | ||
per-file shell_utils.sh = [email protected], [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# | ||
# Copyright (C) 2023 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. | ||
# | ||
|
||
# This file is executed by build/envsetup.sh, and can use anything | ||
# defined in envsetup.sh. | ||
function _create_out_symlink_for_cog() { | ||
if [[ "${OUT_DIR}" == "" ]]; then | ||
OUT_DIR="out" | ||
fi | ||
|
||
if [[ -L "${OUT_DIR}" ]]; then | ||
return | ||
fi | ||
if [ -d "${OUT_DIR}" ]; then | ||
echo -e "\tOutput directory ${OUT_DIR} cannot be present in a Cog workspace." | ||
echo -e "\tDelete \"${OUT_DIR}\" or create a symlink from \"${OUT_DIR}\" to a directory outside your workspace." | ||
return 1 | ||
fi | ||
|
||
DEFAULT_OUTPUT_DIR="${HOME}/.cog/android-build-out" | ||
mkdir -p ${DEFAULT_OUTPUT_DIR} | ||
ln -s ${DEFAULT_OUTPUT_DIR} `pwd`/out | ||
} | ||
|
||
# This function moves the reclient binaries into a directory that exists in a | ||
# non-cog part of the overall filesystem. This is to workaround the problem | ||
# described in b/289391270. | ||
function _copy_reclient_binaries_from_cog() { | ||
if [[ "${OUT_DIR}" == "" ]]; then | ||
OUT_DIR="out" | ||
fi | ||
local RECLIENT_VERSION=`readlink prebuilts/remoteexecution-client/live` | ||
|
||
local NONCOG_RECLIENT_BIN_DIR_BASE="${OUT_DIR}/.reclient" | ||
local NONCOG_RECLIENT_BIN_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/${RECLIENT_VERSION}" | ||
|
||
# Create the non cog directory and setup live symlink. | ||
mkdir -p ${NONCOG_RECLIENT_BIN_DIR} | ||
|
||
if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -lt 8 ]; then | ||
# Not all binaries exist, copy them from the Cog directory. | ||
local TOP=$(gettop) | ||
cp ${TOP}/prebuilts/remoteexecution-client/live/* ${NONCOG_RECLIENT_BIN_DIR} | ||
fi | ||
|
||
ln -sfn ${RECLIENT_VERSION} ${NONCOG_RECLIENT_BIN_DIR_BASE}/live | ||
export RBE_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/live" | ||
} | ||
|
||
# This function sets up the build environment to be appropriate for Cog. | ||
function _setup_cog_env() { | ||
_create_out_symlink_for_cog | ||
if [ "$?" -eq "1" ]; then | ||
echo -e "\e[0;33mWARNING:\e[00m Cog environment setup failed!" | ||
return 1 | ||
fi | ||
_copy_reclient_binaries_from_cog | ||
|
||
export ANDROID_BUILD_ENVIRONMENT_CONFIG="googler-cog" | ||
|
||
# Running repo command within Cog workspaces is not supported, so override | ||
# it with this function. If the user is running repo within a Cog workspace, | ||
# we'll fail with an error, otherwise, we run the original repo command with | ||
# the given args. | ||
ORIG_REPO_PATH=`which repo` | ||
function repo { | ||
if [[ "${PWD}" == /google/cog/* ]]; then | ||
echo "\e[01;31mERROR:\e[0mrepo command is disallowed within Cog workspaces." | ||
return 1 | ||
fi | ||
${ORIG_REPO_PATH} "$@" | ||
} | ||
} | ||
|
||
if [[ "${PWD}" != /google/cog/* ]]; then | ||
echo -e "\e[01;31mERROR:\e[0m This script must be run from a Cog workspace." | ||
fi | ||
|
||
_setup_cog_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.