This reverts commit 01fc887a07.
A number of build breakages occurred which were not caused by presubmit checks.
Change-Id: I1351dba594c8a8b210416f75a67c68554d5b9372
LLVM_RELEASE_VERSION is unused from envsetup.sh and during product
config loading. LLVM_PREBUILTS_VERSION is still used in envsetup.sh, so
needs to stay.
Delay reading core/clang/config.mk until after Soong's variables are
read so that we don't need a copy of LLVM_PREBUILTS_BASE.
Test: Compare build-aosp_flounder.ninja
Change-Id: I85b5836a2230838c8f3766fb19c6108fc5c9ca50
There are no users left, so remove all of this.
Test: lunch aosp_arm-eng; m -j native
Test: build/tools/kati_all_products.sh on aosp and internal master
Change-Id: I32f5c8b470a43dd203d7e20c192167630e4e6888
Add BOARD_VNDK_VERSION and LOCAL_USE_VNDK to specify the version of the
VNDK that will be used globally, and whether to use the VNDK on a module
basis.
If the board is using the VNDK:
* LOCAL_COPY_HEADERS may only be used by modules defining LOCAL_USE_VNDK
* LOCAL_USE_VNDK modules will compile against the NDK headers and stub
libraries, but continue to use the platform libc++.
* LOCAL_USE_VNDK modules will not have the global includes like
system/core/include, but it will use device-specific kernel headers.
This change does not attempt to enforce any linking constraints, that
will come in a later patch.
Test: out/build-aosp_arm.ninja is identical before/after
Change-Id: Icce65d4974f085093d500b5b2516983788fe2905
We are investigating replacing make_ext4fs with the upstream tool mke2fs.
To mitigate the trouble that may arise if the new tool behave differently
compared to the old one, there will be a transition period.
Devices that want to use the new way of creating ext4 images can set the
variable "TARGET_USES_MKE2FS" to true in their BoardConfig.mk
By default, the build system will choose the old tool 'make_ext4fs'.
Test: m otapackage with TARGET_USES_MKE2FS={,false,true}
Change-Id: I282bcb9efe335a86c53986283090ca947d65c7f8
This needs to be included between PARSE_TIME_MAKE_GOALS and KATI_GOALS
Test: m -j <target-from-internal>
Change-Id: I7284f05336b921d40f04ff5811a47bd0d17a066f
When dumping make configuration (dump-many-var, dump-var-*), we only
load config.mk, not main.mk. One of the first things that main.mk does
is to include config.mk, so these moves are safe.
Turning off the implicit rules and other make configuration / sanity
checks should happen in all cases, so move them to config.mk
Move dont_bother_rules to config.mk so that it can be used by the ninja
configuration (which is moving in a later change). Move dont_bother into
the kati section, since it's not used elsewhere.
Test: m clean
Test: get_build_var dont_bother_goals
Change-Id: Ib3ec8aa8eebcaf743d2cdcc31f89827c4e8470a1
So that an external tool can read the configuration using
dump-many-vars, and write out the soong.variables file while only
loading config.mk.
Also remove dumpvar-% from PARSE_TIME_MAKE_GOALS, since it's only used
with CALLED_FROM_SETUP / config.mk. This provides an easy way to test
this change as well.
Test: get_build_var NINJA
Test: get_build_var ANDROID_GOALS
Test: get_build_var NINJA_GOALS
Test: get_build_var KATI_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-NINJA_GOALS" get_build_var NINJA_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-KATI_GOALS" get_build_var KATI_GOALS
Test: MAKECMDGOALS="out/build-a.ninja dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: get_build_var SOONG_MAKEVARS_MK
Test: get_build_var SOONG_VARIABLES
Test: CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make -f build/core/config.mk out/soong/soong.variables showcommands
Test: Compare soong.variables from above, and before/after with `m`
Test: Compare out before/after with `m doesnotexist`
Test: `m dist doesnotexist`
Change-Id: I1bc291aa165297c930fe600067edad6ce4979210
When dumping make configuration (dump-many-var, dump-var-*), we only
load config.mk, not main.mk. One of the first things that main.mk does
is to include config.mk, so these moves are safe.
Turning off the implicit rules and other make configuration / sanity
checks should happen in all cases, so move them to config.mk
Move dont_bother_rules to config.mk so that it can be used by the ninja
configuration (which is moving in a later change). Move dont_bother into
the kati section, since it's not used elsewhere.
Test: m clean
Test: get_build_var dont_bother_goals
Change-Id: Ib3ec8aa8eebcaf743d2cdcc31f89827c4e8470a1
These are all variables that we export from Soong, and are only used
after Soong's make_vars.mk is read.
Test: Compare build-aosp_flounder.ninja before/after -- only whitespace
Change-Id: Ibb6c6d7bc00ff5840a72c2bba5d97ac4b4724df3
* Add -Werror if LOCAL_PATH is in the WARNING_DISALLOWED project list,
or not in the WARNING_ALLOWED project list.
Test: Build for major targets.
Change-Id: I12235ee1ca1c1837530693699e705e1955275565
Instead of using rot13 / rot26, use the Kati extension to mark these
variables as readonly.
Move $(strip) for a few variables to before they're marked readonly. Use
a different variable for modifications to BOARD_KERNEL_CMDLINE in
build/core/Makefile.
Test: build/tools/kati_all_products.mk on AOSP and internal master
Test: build-aosp_bullhead.ninja the same before / after
Change-Id: If98b24af763831a9c5c2de38037a69ab1bf9e023
Runtime resource overlay is a bare APK with just the overlaid
resources. There is no need for additional subdir.
See http://go/sku-colors.
Bug: 31692079
Change-Id: Iff3d58f941e764a7be3ec04cafeefd592bd8b944
If a shared library has no exported symbols grep will return exit code
1 meaning no matches, but this should not be considered an error
during toc generation.
Test: external/clang/build.py
Change-Id: If589da38ad8b844fe1aff4738481cebea75cca42
Pruning $(OUT_DIR) can be overaggressive if $(OUT_DIR) matches the name
of any directory in the source tree that contains Android.mk files.
Pruning $(OUT_DIR) is no longer necessary, as one of the first things
the build system does is put an empty Android.mk file in there to avoid
recursing into it.
Bug: 31941856
Test: m -j OUT_DIR=angler
Change-Id: I7c5e95816f35bd5906845716d56cca76de7fa1ad
This updates the build system for the new Android Verified Boot
codebase. As this is based on Brillo Verified Boot, this change replaces
the existing BVB support.
Android Verified Boot is enabled by the BOARD_AVB_ENABLE variable
BOARD_AVB_ENABLE := true
This will make the build system create vbmeta.img which will contain a
hash descriptor for boot.img, a hashtree descriptor for system.img, a
kernel-cmdline descriptor for setting up dm-verity for system.img and
append a hash-tree to system.img.
Additionally, the descriptors are left in boot.img and system.img so a
third party can create their own vbmeta.img file linking - using the
option --chain_partition - to these images. If this is not needed
footers can be erased using the 'avbtool erase_footer' command. It's
also harmless to just leave them in the images.
By default, the algorithm SHA256_RSA4096 is used with a test key from
the AVB source directory. This can be overriden by the
BOARD_AVB_ALGORITHM and BOARD_AVB_KEY_PATH variables to use e.g. a
4096-bit RSA key and SHA-512:
BOARD_AVB_ALGORITHM := SHA512_RSA4096
BOARD_AVB_KEY_PATH := /path/to/rsa_key_4096bits.pem
To prevent rollback attacks, the rollback index should be increased on a
regular basis. The rollback index can be set with the
BOARD_AVB_ROLLBACK_INDEX variable:
BOARD_AVB_ROLLBACK_INDEX := 5
If this is not set, the rollback index defaults to 0.
The variable BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS can be used to specify
additional options passed to 'avbtool make_vbmeta_image'. Typical
options to be used here include '--prop', '--prop_from_file', and
'--chain_partition'.
The variable BOARD_AVBTOOL_BOOT_ADD_HASH_FOOTER_ARGS can be used to
specify additional options passed to 'avbtool add_hash_footer' for
boot.img. Typical options to be used here include '--hash_algorithm' and
'--salt'.
The variable BOARD_AVBTOOL_SYSTEM_ADD_HASHTREE_FOOTER_ARGS can be used
to specify additional options passed to 'avbtool add_hashtree_footer'
for systems.img. Typical options to be used here include
'--hash_algorithm', '--salt', and '--block_size'.
BUG=31264226
TEST=Manually tested on edison-eng by inspecting {boot, system,
vbmeta}.img in out/ directory as well as their counterparts in
the IMAGES/ directory of edision-target_files-eng.zeuthen.zip
Merged-In: Ic9a61cfc65c148b12996e57f04da5432eef6b982
Change-Id: I97042655bca15e7eac899f12c5bada2f6184d307
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.
Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.
Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.
Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
Remove the global linker search path, as it can cause spurious build
failures. If a library with the same name as a system library is in the
process of being written to the directory in the global search path, and
the linker may try to read the partially-written built one instead of the
system one. We already use full paths to libraries for target builds,
do the same for host builds. Also remove the normalize library
functions, they are no longer necessary.
Test: m -j checkbuild
Bug: 31393456
Change-Id: If9fc631e111f568c700fd73e103445c30d7e9d11
fat16copy.py can be used to copy files or directories in to the root of
a fat16 image.
Usage: fat16copy <image> <file> [<file> ...]
Test: Used to compose a Raspberry Pi 3 boot image
Bug: 28912590
Change-Id: I29c9eec3786e2c5cc94f9a160360bac850809a93
config.mk is parsed by make and then kati, and goma.mk appends to
CC_WRAPPER. Only export it from make so gomacc doesn't appear twice on
the command line.
Bug: 31142427
Change-Id: I5ad97ee3a00b013faa620215c839499b48528e00
Pass the USE_GOMA flag to soong, and export the CC_WRAPPER environment
variable after adding gomacc to it.
Bug: 31142427
Change-Id: I6de698a40817c0615b03fa17bd27075465d79ffd
soong_zip parallelizes the compression when creating a zip file, which
makes these packaging steps far shorter.
zip2zip skips the decompression and recompression during the -img- file
creation.
For an aosp_arm64-eng aosp/master build:
target_files.zip: 92s to 60s
symbols.zip: 147s to 7s
img.zip: 64s to 0.5s
There's still room to parallelize the image compression during
target_files.zip (add_img_to_target_files step takes most of the time)
Change-Id: I7b6a91e4a7dbeda2e49ca936b10181cff2f973d7
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable
Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>