Extend COMPATIBILITY_SUITES in module-info to avoid overwriting previous
values. In particular, this happens for the `host-unit-tests` suite
which is automatically added by Soong rules only to be clobbered by the
modules that have both device and host variants.
Bug: 209806322
Test: source build/envsetup.sh ; lunch aosp_cf_x86_64_phone ;
m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I56a2d4c9786ed3da1e788ba211ec1bcaa6559549
Soong creates install rules and lists them in LOCAL_SOONG_INSTALL_PAIRS,
where they get copied to ALL_MODULE.$(m).BUILT_INSTALLED. BUILT_INSTALLED
is used by package-modules.mk to copy the built modules to alternate
install locations for building zips like continuous_native_tests.zip.
Translate Soong's built module location, which is listed in
LOCAL_PREBUILT_MODULE_FILE, into $(LOCAL_BUILT_MODULE) when setting
BUILT_INSTALLED so that package-modules.mk copies from
$(LOCAL_BUILT_MODULE) instead of $(LOCAL_PREBUILT_MODULE_FILE). This
ensures that the transitive dependencies added to $(LOCAL_BUILT_MODULE),
for example the unstripped symbols files, are present when
continuous_native_tests.zip is built.
Bug: 206137439
Test: manual
Change-Id: I1a45cd6d3c81d6435a10f4d29557e521753068a4
Abandon the use of RECORD_ALL_DEPS to record ALL_DEPS.
BUG: 204397180
Test: m, and inspect module-info.json.
Change-Id: Iaf35580b52c11ad37017b1fb8e0937b859d3f55b
Don't create compatibility suite copy rules for $(LOCAL_BUILT_MODULE)
to $(LOCAL_INSTALLED_MODULE), as that could conflict with a Soong
install rule. Instead, always create the install rule the normal way,
and replace the compatibility suite copy rule with a noop if it is the
same as the normal rule.
Bug: 204136549
Test: m checkbuild
Change-Id: Ic8ac80eda8554fae2b7ecc2516165da020bdaebe
The rules to install the symlinks had dependencies from PRODUCT_PACKAGES
install rules, but from manual install requests like `m toybox`. Add
the missing dependencies. Also add the new declare-0p-target licensing
call.
Fixes: 205524422
Test: m toybox
Change-Id: Ie9a5e37b09250aa271ab153a13f41bc34fa4a38a
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Test: m systemlicense
Test: m reportmissinglicenses
Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
There was a relatively recent change (id
I82d0f40d6d7047e271612204391c5a027f84f52f) which avoided installing
init_rc scripts to system when a module was installed to system. This
same bug also existed in VINTF installs.
Future consideration: macrotize behavior (delaying since there are some
subtle differences in paths/variables and given bazel efforts).
Fixes: 204270700
Test: boot
Test: 'mmma hardware/interfaces/health/aidl/default' installs vintf
fragments to '/system/etc/vintf/manifest' before this change but not
after.
Change-Id: Icf505af74c95386a0ed8cb4468dcf7c1122db847
Support moving some install rules into Soong by allowing Soong to
provide a Makefile containing install rules, and by skipping parts
of base_rules.mk when Soong already created an install rule.
The install rules are exported as a Makefile instead of directly
in Soong's build.ninja file so that base_rules.mk can add dependencies
from the `required` property that are hard to resolve in Soong.
Bug: 204136549
Test: m checkbuild
Change-Id: Ife2964d76469b385e90c0c5f6adf21bd2b5e8bf6
Disable the generation of .config file when the variable
LOCAL_DISABLE_TEST_CONFIG is true.
Bug: 188927912
Test: rum 'm module-name' (`android_test_helper_app` type module)
Test: TreeHugger
Change-Id: I64372b4ba84fcf1af937abdee345ceb1d3c2f6c5
To prevent the argument be cleaned if the same module name with
different unit_test value, treat it as unit test if one of the module is
treated as unit tests.
Bug: 176096135
Test: m out/target/product/generic/module-info.json
Change-Id: Iee4ee1063d47dcba1aaf915ec9e4e56f8c7df787
Soong supports references to other modules for vintf_fragments property,
so full paths need to be passed from Soong to make rather than module
local paths.
Test: m droid
Bug: 184567830
Change-Id: Ia7f1cf977de8aeb08d41624277ff6231198222e5
Soong supports references to other modules for init_rc property, so full
paths need to be passed from Soong to make rather than module local
paths.
Test: m droid dist
Bug: 184567830
Change-Id: Ib1873a3418830f5cbf32e26f55d3ad0ab0d9c9c5
If a module is installed to TARGET_RECOVERY_ROOT_OUT,
then its init rc file (declared in LOCAL_INIT_RC) is installed
to $OUT/recovery/root/system/etc/init instead of
$TARGET(partition)_OUT_ETC/init.
Fixes: 178859897
Test: m snapuserd.recovery
Change-Id: I82d0f40d6d7047e271612204391c5a027f84f52f
Because flattened apexes are installed in /<partition>/apex, associated
file_contexts file should be modified to accommodate path changes and
also merged into target-wide file_contexts.bin file.
Soong now emits modified file_contexts via LOCAL_FILE_CONTEXTS, and
these files are collected into a temporary file_contexts.modules.tmp
file, which is used as an additional input of file_contexts.bin.
Bug: 166518492
Test: m file_contexts.bin
check the contents of file_contexts.concat.tmp file
Change-Id: I002a2294af9e06baeaf54bc5a9a5380d23b8a3da
and shared libs.
If a prebuilt module file is a symlink in the .intermediates tree it is
preserved when copied to the final install location. This preserves
symlinks to prebuilt binaries, so that they are run from their prebuilt
source location and can find libraries in relative paths from there.
Symlinks are converted to absolute, to not fail if they are relative in
the source tree.
Test: m clean && m droid dist checkbuild
with and without the change, then compare the lists of symlinks in
the out/ trees
Test: build/soong/soong_ui.bash --make-mode \
TARGET_PRODUCT=crosshatch_hwasan TARGET_BUILD_VARIANT=userdebug \
droid SANITIZE_TARGET=hwaddress \
continuous_instrumentation_tests_api_coverage \
continuous_native_tests device-tests platform_tests
check that libclang_rt.hwasan_static-aarch64-android.a isn't a
symlink in out/target/product/crosshatch/obj
Bug: 145934348
Change-Id: I7600e5b0754f8ea6cd0ffc8e1ba6d39153f182aa
If BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES has a numeric value,
it replaces "current" or "system_current" with the version which
the flag indicates.
Bug: 163009188
Test: BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES=29 m, and then check if every vendor
java module's sdk_version is 29 if its sdk_version was current.
Change-Id: I8c7cf21563b984b8e9ef398192031b1f66d96494
So we don't accidentally create phony rules like
`MODULES-IN-: MODULES-IN-` and `MODULES-IN-.: MODULES-IN-*`
Bug: 162918277
Test: m com.android.art
Test: ninja -t browse
Change-Id: Id0656d1b08bc933df57914df162853934352593b
It should happen after adjusting vendor and product variables.
Bug: 162476652
Test: see image variant with LOCAL_PROPRIETARY_MODULE := true
Change-Id: I071434916c9ad18572c559a26e3ef6abb8c47303
Dependencies of makefile modules are being redirected according to
SOONG_CFI_STATIC_LIBRARIES and SOONG_HWASAN_STATIC_LIBRARIES. But the
variables are shared among all variants (e.g. core, vendor, product,
arch), which can cause build error.
This splits the Makefile variables into several lists, one list per each
arch and each image variant, to correctly make the redirection.
Bug: 162476652
Test: build and inspect ninja
Change-Id: I8a46804d4b7c1c485e59e10710cc514a89333fa4
Test: Verified in conjunction with changes to soong (aosp/1359742)
Test: Treehugger to verify backwards compatibility
Change-Id: I39d2669ff74b4387606b6416e8afefc1f6507348
Unlike the previous performance patches, this does change the ninja
file, shrinking build-aosp_crosshatch.ninja on aosp-master from 393MB to
387MB, while reducing kati runtime from 28.6s to 27.7s.
Previously, MODULES-IN-art would depend on every target defined under
art/***. After this change, it only depends on the modules names that
were directly defined under it, and depends on the MODULES-IN-art-*
for its subfolders.
Bug: 158488548
Test: mmma system/core/adb
Test: mmma system/core
Change-Id: Idfe80f707738faae4777e0d6dc9fd08014775696
A few more misc improvements that I found while analyzing the
performance of base_rules.mk.
This brings an aosp-master/aosp_crosshatch-userdebug kati run from 33.3s
to 28.6s
Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: If99c31cc7b5d7133d70eb644c6095f19060b71e5
It turns out we have a few tests with thousands of test data files,
which this logic does not handle very well. Just switching from `x :=
$(x) ...` to `x += ...` accomplishes the majority of these gains, but I
rewrote the logic to be less function-call+eval based to hopefully make
it easier to understand.
For an aosp-master/aosp_coral-eng build, this brings the time spent in
this logic from 7.6s to 0.3s (total kati runtime of 54s to 46s). Kati's
peak memory use (maxrss) also shrunk from 6.1GB to 3.8GB.
Bug: 158488548
Test: build-aosp_coral.ninja is the same before/after
Change-Id: Ia2ec8b29b5c1dd12fa7ea10b4f80fe802c692725
This reverts commit 6e1fa4452b.
Reason for revert: relanding a reverted changed
Bug: 153073816
Change-Id: I3735866776cf6eb0320c9fb8c6be8ac0c48baa1c
Test: m
This reverts commit f9e67a8980.
Reason for revert: broke some targets
Exempt-From-Owner-Approval: reverting
Change-Id: I10af29b0fcf564dba0c3dbc1951b660b24fc58bb