my_generated_res_dirs wasn't being reset in some cases in between
different modules. To be safe, clear every input variable that I was sure
was not being used by the caller after aapt2.mk.
Test: m
Test: m ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I37c861d99637cad77a2a378a119bf66cee373b3a
We don't have great alternatives for some of these use cases, so for now
just silence them, writing them to $OUT/product_copy_files_ignored.txt
(and if `dist' is specified, $DIST_DIR/logs/product_copy_files_ignored.txt)
Test: lunch aosp_arm-userdebug; m nothing
Test: lunch aosp_arm-userdebug; m dist
Change-Id: If0228bc8d907346e3505ae136cb477ef37a5c867
When generating full OTAs for AVB-enabled targets, it fails the size
assertion for boot.img.
ERROR: boot size (31457280) is 100.00% of limit (31457280)
The size assumption is no longer true for AVB-signed images, because
the actual image size should be always identical to the limit.
Bug: 67841177
Test: Enable AVB on bullhead. `m dist`.
Change-Id: I9bd432ccd88094628eb71308554839549eccb6d9
When some of the full treble requirements are turned off,
PROUCT_FULL_TREBLE became false, which in turn cleared macro variables
guarded in treble: {cflags: "..."}.
Until when Soong recognizes each of the requirements (e.g.
treble_sepolicy: { }), don't reset PRODUCT_FULL_TREBLE to false
even when some of the requirements are not met.
Bug: 62019611
Bug: 68710251
Test: get_build_var PRODUCT_FULL_TREBLE returns true for aosp_walleye
Test: aosp_walleye boots to the UI
Change-Id: Iad3ee4f4462c82e9f9e1897f3ec019cdd16da358
The following properties are specified under platform/build as system
default values.
- tombstoned.max_tombstone_count
- debug.atrace.tags.enableflags
- dalvik.vm.dex2oat-minidebuginfo
So they should move into system partition.
Bug: 64661857
Test: confirmed that the default properties were stored in
/system/etc/prop.default on sailfish device
Change-Id: Ic34c05fd9761e281962b6bb425e4babedfca45a9
With the new implementation of handling large apks, we need to call
imgdiff with block-limit to split the apk and generate the patch at
the same time. The call to imgdiff would significantly increase the
time consumption of the "FindTransfers" function which we used to
execute sequentially. This cl addresses this issue and speeds up the
process by making the imgdiff call parallel.
Bug: 34220646
Test: Create and sideload an incremental package for angler
Change-Id: Id62e348418fc1d22e32ea6c8ac16d9ab3ec92d7b
PRODUCT_SEPOLICY_SPLIT
PRODUCT_TREBLE_LINKER_NAMESPACES
PRODUCT_ENFORCE_VINTF_MANIFEST
Being able to selectively toggle these does several things:
- it's better software engineering (no longer conflating vars)
- easier bringup for devices.
- devices which don't require full Treble can opt out of only
parts of it and still get the benefits of others.
Bug: 62019611
Test: manual
Merged-In: I728e32869baf043ae9a54e83e513fb99e560c827
Change-Id: I728e32869baf043ae9a54e83e513fb99e560c827
PRODUCT_FULL_TREBLE is being split up into smaller,
more manageable flags.
Bug: 62019611
Test: manual
Change-Id: I046f9eb4099cf441842f3d0e6908d99df063c27e
With the update of brotli to version 1.0.1 the new binary tool is now
called "brotli". This patch updates the scripts to use the new name.
Bug: 34220646
Test: `make dist`; ota_from_target_files on non-A/B device.
Change-Id: Ie8da4333388d029d5960a723a55efd875d8ee820
checkvintf will be used to verify compatibility of OTA packages.
Bug: 68327258
Test: `m -j dist` and inspect archive for checkvintf
Change-Id: I1d4cfcff537a03adee28d1e6ba9403a2e1635fe0
With this enabled, we'll check the entire build graph for missing
dependencies -- even if you don't need to build the module. So it'll
present more errors, but surface them earlier.
These can be turned off manually with an environment variable if the
branch is expected to have missing dependencies:
ALLOW_MISSING_DEPENDENCIES=true
SOONG_ALLOW_MISSING_DEPENDENCIES=true (previous method)
That will be set automatically when using 'mm', which doesn't load the
entire build graph. It will also be set when using 'tapas' to build
unbundled apps, since those are usually on reduced branches.
This provides better error messages when a library is missing:
system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm64) missing libinit (SHARED_LIBRARIES android-arm64)
Available variants:
libinit (STATIC_LIBRARIES android-arm64)
libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm) missing libinit (SHARED_LIBRARIES android-arm)
Available variants:
libinit (STATIC_LIBRARIES android-arm64)
libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/core/main.mk:852: error: exiting from previous errors.
instead of:
ninja: error: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libinit_intermediates/export_includes', needed by 'out/target/product/generic_arm64/obj/NATIVE_TESTS/init_tests_intermediates/import_includes', missing and no known rule to make it
Test: Manually introduce errors, check for expected output
Test: multiproduct_kati on AOSP and internal master, no new breakages
Change-Id: I5847f813045929813214137403c499b44ef67907
Merged-In: I5847f813045929813214137403c499b44ef67907
When signing a target_files.zip, the OTA certificate specified by
default_system_dev_certificate could be replaced with a mapped key. When
that happens, we must explicitly specify --package_key when generating
OTA packages with ota_from_target_files.py. Otherwise the OTA package
will be signed with the wrong key, which leads to verification failures.
This CL updates the default_system_dev_certificate value in
misc_info.txt accordingly.
Test: Sign a target_files.zip and replace the OTA key. Check
META/misc_info.txt in the generated target_files.zip.
$ ./build/make/tools/releasetools/sign_target_files_apks.py -v \
--replace_ota_keys \
-k build/target/product/security/testkey=build/target/product/security/platform \
out/dist/aosp_marlin-target_files-eng.tbao.zip \
signed-marlin-target_files-test.zip
Change-Id: I093234b5add3e27c5b3887cefeffd74e6f0a3e98
we should clean up proguard_flag_files if LOCAL_PROGUARD_ENABLED
not defined in current module in case legacy proguard_flag_files
slips into current jack_all_deps dependencies.
Test: make -j8
Change-Id: I45618fc8e821ab7a8b964fa621824209e1e9894c
Signed-off-by: ShuJie Wang <wangshujie@xiaomi.com>
test_common constructs a few 2GiB strings in memory, which leads to huge
memory footprint (18GiB). This CL moves away from in-memory strings to
generators, which reduces the memory use down to 41MiB. It also reduces
the time cost from 294s to 139s as an extra benefit for free.
The CL addresses some trivial pylint warnings as well.
* Before
$ /usr/bin/time -v python -m unittest -v test_common
...
----------------------------------------------------------------------
Ran 11 tests in 294.986s
OK
Command being timed: "python -m unittest -v test_common"
User time (seconds): 110.51
System time (seconds): 109.34
Percent of CPU this job got: 74%
Elapsed (wall clock) time (h:mm:ss or m:ss): 4:55.06
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 18894172
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 20774908
Voluntary context switches: 48
Involuntary context switches: 3241
Swaps: 0
File system inputs: 184
File system outputs: 8406424
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
* After
$ /usr/bin/time -v python -m unittest -v test_common
...
----------------------------------------------------------------------
Ran 11 tests in 139.100s
OK
Command being timed: "python -m unittest -v test_common"
User time (seconds): 59.00
System time (seconds): 4.73
Percent of CPU this job got: 45%
Elapsed (wall clock) time (h:mm:ss or m:ss): 2:19.17
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 41252
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 106569
Voluntary context switches: 44
Involuntary context switches: 103
Swaps: 0
File system inputs: 8
File system outputs: 8422808
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
Fixes: 68988396
Test: See above.
Change-Id: I00f16603a4ee59fb085b189c6f5b5ee9d2378690
This CL adds the ability to centrally enable or disable CFI for
components using either an environment or product config
variable. This is a better, nore manageable option that enabling CFI
across each component individually.
Bug: 67507323
Test: CFI_INCLUDE_PATHS= system/nfc m -j40
Test: CFI_EXCLUDE_PATHS = frameworks/av m -j40
Change-Id: I02fe1960a822c124fd101ab5419aa81e2dd51adf
The Java PATH fixup is now handled within soong_ui, along with the
values of ANDROID_JAVA_HOME based on OVERRIDE_ANDROID_JAVA_HOME /
EXPERIMENTAL_USE_OPENJDK9.
Mark PATH as deprecated, so that any reads/writes will cause warnings.
This will be switched to obsolete once it's verified that there are no
more users.
Using PATH within Kati means that we've got to rebuild the ninja files
whenever your PATH changes, which is not ideal, especially since some of
the envsetup functions can change your PATH. In most cases you only need
to use PATH within the bash portions of the build rules ($${PATH}), which
isn't treated as a make variable, so won't produce an error.
I'm also planning on replacing PATH in a future change with our own
directory that has placeholders for everything in your PATH. This will
let us remove tools that shouldn't be used from the build.
Test: m nothing
Test: build/soong/build_test.bash on AOSP and internal master
Change-Id: I18d8d19cfba313ff9176345bf73ac34e8dbebfbb
Bug: 64661857
Bug: 68755013
Test: confirmed that ART default properties were stored in
/system/etc/prop.default on sailfish device
Change-Id: Ie07d3049de5ac395cfb9105e208fe7825080fa15
imgdiff fails on plain strings after we put more checks the input
data. This leads to failure when running unittest
"test_recovery_from_boot". The CL fixes the issue by serving gzipped
dummy images as the test input.
Bug: 68988329
Test: InstallRecoveryScriptFormatTest passes
Change-Id: I1952b311681ac4f39c0e51aef1de1177aebeac43
Adapt the gcno packaging logic from shared_library_internal.mk for the
case of executable binaries so that gcov artifacts are properly
packaged.
Test: lunch walleye_coverage-userdebug && make -j60
Bug: 67998360
Change-Id: I4994fc21521c91d4c18bdf326be079beda1914a4
Instead of building R8 from external/r8 use the prebuild jar in
prebuilds/r8.
Test: m -j USE_R8=true
Change-Id: I9680ae430cdbc2b3beb910873c8eed27354f6af1