With the order-only dependency if the jni so files is updated,
make won't rebuild the system.img, which has dependency only on the apk
file.
Bug: 24865400
Change-Id: I9d5bee82b8a712a2c24dabaa0cd4c50174ea219f
Don't pass the arg list as argument in any bash command;
Instead store the arg list to the arg list file and
run "jar @arg-lsit-file".
Note we need to quote the arguments in the arg list file.
This fixed "argument list too long" build error on Mac.
Bug: 24789595
Change-Id: I718f84e540d82bb83516824894a473b2961da278
The list of archs of a pure java apk (no native libs) is empty.
In this case get-prebuilt-src-arch still return 'none'.
If it's set to LOCAL_MODULE_TARGET_ARCH, it makes the apk
be incompatible with the building target. It's not good.
Just return empty in this case.
Change-Id: Ide75cdb08c8480c8e7d3a0ac59f41831fbc18bd5
Don't pass the arg list as argument in any bash command;
Instead store the arg list to the arg list file and
run "jar @arg-lsit-file".
This fixed "argument list too long" build error on Mac.
Bug: 24789595
Change-Id: I3e5cd18fd988f12f0876b152b8bf07d07b56119e
To consolidate the number of places that we're using 'find' in the tree,
add some more helpers:
all-named-dirs-under
all-subdir-named-dirs
all-named-files-under
all-subdir-named-files
This change also makes many of the current helpers use these helpers
instead of using their own implementation.
The 'dirs' helpers are using '-type d' so that they only output
directories. It's probably safe to use '-type f' for the files helpers,
but that increased the kati load time by ~20%.
Bug: 24204119
Change-Id: I3312e2fe8c146f10955e1d986ad15d9c8be494e1
When using the A/B updater, include the product version string to
target_files.zip.
This is needed by the Omaha backend.
BUG: 24743570
Change-Id: Idaba06624c1de452b1e1f9d3ebec851229af987a
6ff74ce8ee
should have made this workaround unnecessary. Now, even with
old build/core, "m -j32 PRODUCT-aosp_mips64-eng dist" does not
output a ninja file with "$(cat )".
Bug: 24384320
Change-Id: I262edf00dce39f39ec4e55d5ed7b1b6f8d931f33
Even if word list is empty.
Not creating the file was causing print of error messages that were
not preventing compilation to continue when compiling Java module with
no source.
Change-Id: I095b85f85ed6fcef5882afa39d4af51b78124c7c
The OTA/bin tools are not needed in the target files zip when using
the A/B OTA updater.
Bug: 24577767
Change-Id: I7938a906e4d73709aaa944e8065f922536072e27
gcc color diagnostics stopped working when the flag was moved to
TARGET_GLOBAL_CFLAGS, as that gets overwritten by combo/select.mk. Put
it back in COMMON_GLOBAL_CFLAGS, and then let the windows build filter
it out, similar to the way clang deals with unknown flags.
Change-Id: I2db221edb893d81f199494e7515d1b9282c12fae
The list of A/B partitions updated is product-specific. Normally you
would update boot and system, but the product could require to update
other partitions during a system update. This patch packages the list
of A/B partitions configured to be updated when using the A/B updater.
The list can be set in the product makefile by setting the make
variable UPDATE_AB_PARTITIONS.
Bug: 24387863
Test: `make dist` creates the META/ab_partitions.txt in the target_files.zip
Change-Id: I4226ab05c7c7cd74721b06f1da64c6cf4d0e52ac
We should pass --gen_all_targets to have targets which are not declared
as .PHONY. However, this triggers some nasty behavior inherited from
make, where targets can get variables from things that depend on them.
--gen_all_targets will traverse the targets starting at random points in
the dependency tree, and any variables set higher in the tree will not
be visible. To work around this, keep --gen_all_phony_targets, which
will start traversing at the phony targets first. This will enter the
tree traversal at points we know don't use inherited variables, like
checkbuild or the PARSE_TIME_MAKE_GOALS, and will reach all the
dependencies that use inherited variables in the right order.
--gen_all_targets will then fill in any remaining targets that were not
in the main dependency tree, and hopefully none of them use any
inherited variables.
Bug: 24384320
Change-Id: I1ff07b7ef26e9481baae678e7fe0933b6d05f2a7
Many of these may not make a difference in the output images, but it's a
good idea to keep the make system as repeatable as possible.
Change-Id: I31804b8ad5805148ed08be7426a242a16f4d0df3
Many of the packages on ALL_PREBUILTS grandfathered list are no longer
in the tree. Remove them to whittle the list down, so we can tackle the
remaining items.
Change-Id: Id6c026727ed7bef36d1803719df05d2e50afc5cc
Move the ninja files from $(PRODUCT_OUT)/build.ninja to
$(OUT_DIR)/build-$(TARGET_PRODUCT).ninja. This will improve incremental
builds of host modules after swithing target products, because the
.ninja_deps file will be accurate across builds.
Change-Id: Ia12746ccde0de31f6fccd111b2bdbd48fc6900d7
This config file pulled directly from the source specifies the update
payload version supported by the code. When generating an incremental
update payload for the A/B updater, the generated payload format will
match the version supported by the old version.
Bug: 24406755
Test: `make dist` on Brillo.
Change-Id: Ib7ac6828d0d34eb31e786dbaae5d59ecf26c3576
After 3ad3549519 (Don't add CFLAGS to
CPPFLAGS), makeparallel now needs to explicitly include CFLAGS like
kati.
Change-Id: Ib50328da147f03647bb5b99f6d69948d644eece9
dist is a strange dual-use target, as both a flag and a goal. make dist
<target> means build <target>, but copy any dist-for-goals files to
$DIST_DIR. make dist without a target means build droid with
dist-for-goals files. This requires special handling of MAKECMDGOALS to
detect the case where dist is the only goal, which breaks when ninja.mk
doesn't pass all the goals to kati. Instead, let ninja handle the
default goal. Pass dist to kati if it is specified in order to turn on
the dist-for-goal rules, but filter it out of the goals passed to
ninja. If there are any other goals, ninja will build them. If there
are no goals, ninja will fall back to the default goal, which is droid.
Change-Id: Iafb184d28cb312cb7c5682cd3ff4f310b2d9f7e9
There are multiple versions of this in the tree. Let's standardize on
one that will work for everyone, and will sort the results.
Bug: 24204119
Change-Id: I09fcd80e1e8e35e64d8a8a62bbc096f87b02603f