This is helpful for analyzing how often a library is included statically
on a device. If a large library is linked statically in many processes
in a single device, it may be a good candidate for shared linking
instead.
This increases the size of module-info.json file on Cuttlefish by ~12.5%
from 65MB to 72MB.
Test: m
Bug: 280829178
Change-Id: I3614d86d799810e1ce845e1097f43f1ec0a412a3
This file was an archive of all the gpl files that could be found
in the source tree. Because it looks for gpl files using $(wildcard),
kati had to rerun the wildcards every single build to see if they had
changed. These GPL wildcards made up 30294 of 63996 wildcards present
on aosp-master. Removing these wildcards saves (aosp/internal) ~0.2/~0.1
seconds from every build, and ~0.4/~0.6 seconds from the wildcard
checking portion of kati. (The whole build sees <0.4s/0.6s of
improvement because it's parallelized with the shell checking, but
improvements here mean that we can now improve the shell commands as
well and get more fruitful results)
We don't actually use gpl_source.tgz anywhere, so we can just remove it.
Bug: 282079550
Test: m nothing
Change-Id: I77141dbb39b2d8ebd96bc258fe7dbdff5a372977
Original aosp/2374663 was reverted, so this change cnotains the implementation but disabled by default and SBOM will not be built by default with "m dist".
The feature will be enabled later in small CLs after running tests successfully in forrest.
Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: I926d0f97f3a0330ef61d059f12ea660005d370e6
All Robolectric tests are set as uninstallable modules, which skips the
logic exporting `test_config` and `auto_test_config` to module-info.
But downstream infra needs this information to determine if a module is
a test module. So that this change moves the logic that sets
`test_config` and `auto_test_config` for Robolectric tests out of the
snippet specifically for installable module.
Test: m out/target/product/coral/module-info.json
Bug: 268670243
Change-Id: Icf4caf3d6833f3a39927fb69c6fb76762b8f6f14
For targets with BoardUsesRecoveryAsBoot set to true, binaries in
generic_ramdisk are installed to $OUT/recovery/root/first_stage_ramdisk
This path is not on generic_ramdisk.mk 's allowlist, hence build fails.
To fix the failure, add $OUT/recovery/root/first_stage_ramdisk/system to
allow list.
Test: th, lunch eos-userdebug(a dedicated recovery partition target) and build.
Bug: 265477065
Change-Id: I89cf229adc028a7e5de632b9a3188ecb411de735
Some Java modules are defined in Android.mk and they declare
dependencies in eigther LOCAL_STATIC_JAVA_LIBRARIES or
LOCAL_JAVA_LIBRARIES. This information needs to present in
module_info.json and be exported to properly generate Bazel targets
that include these dependencies.
Test: m out/target/product/coral/module-info.json
Bug: 245686435
Change-Id: I77bc8de59f1d46bb098463066e1f52b98ebae955
There are some module definitions in the Makefile, which needs to be
built with API imported module. This change replaces existing
dependencies from the Makefile, to append suffix on the reference, so it
can be linked to API imported modules.
Bug: 243736650
Test: 'ALLOW_MISSING_DEPENDENCIES=true m halutil' succeeded.
Change-Id: I12baa36e41c0c69228be5f0d08fb4c18eb8a22b1
The test_options.tags attribute modifies execution behavior when running
tests in ATest Bazel mode. Exporting the value to module-info enables
ATest to add them to the corresponding Bazel target.
Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
$ refreshmod && \
cat out/target/product/generic/module-info.json |\
grep <tags>
Change-Id: I1a70d5c66703ed6a5a250459a80e8bca71d659b6
This lets product/board config define a function that
is called while processing modules defined in an
Android.mk file.
When the product/board configs are converted
to starlark, they won't be able to supply a base-rules-hook
anymore. Emit a warning saying that it's deprecated.
Bug: 226974242
Test: Manually
Change-Id: Ie6baa4952516a3ec5c6c440f9106f7b5185803b7
Test: th
Test: m target-file-package, then check INIT_BOOT dir of target file,
make sure snapuserd.rc is there
Bug: 219841787
Bug: 228893064
Change-Id: Iac3f219c763fbf8acd17f0339089c7576974dc05
Had to make changes to make to ensure that we don't duplicate
Bug: 226402757
Test: Confirmed that libraries are installed to the correct place
Change-Id: I64e4a5ab7cac3fb57442d19b0f796fffb0a3f48a
Switch from combine-notice-files to html-notice-rule and
text-notice-rule.
Bug: 151177513
Bug: 213388645
Bug: 210912771
Test: m cts reportmissinglicenses
Change-Id: I59d78553f15f0fd6be87228c933693b63e2ebf04
Export the list of variants (host, host_cross, device) a build module
supports to module-info for downstream tools. The values correspond to
the Soong `host_supported`, `host_cross_supported`, and `device_supported`
attribute values.
Bug: 220263783
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I10ae6ea21791d0d100686dcabecbce543a9adc3f
This change exports the list of test_data_bins as data dependencies
that are required by modules when running the test.
Bug: 215234071
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ie5c1ef70055618a5fa0ba1bcfbcba8054743d41a
This change exports the list of dependencies that are required by
modules at runtime. Note that only the host case is currently
handled.
Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I05199c54da311e59c7ea87595397ee4eecfab6a3
Add the list of targets that are handled as data inputs and
required by tests at runtime.
Bug: 205726862
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Id1468ebaf8f72cf37787f3cc514a29724c115db5
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