Some MCTS modules should not be removed from CTS because they are
dependencies of both MCTS and CTS.
Add a whitelist as a short term solution.
Test: m cts EXCLUDE_MCTS=true
Bug: 349372705
BYPASS_INCLUSIVE_LANGUAGE_REASON=for mcts only
(cherry picked from https://android-review.googlesource.com/q/commit:9005bb61f7e955536ac786ccf38f41aae8f0665c)
Merged-In: I26ada6da95a8b3547de9e54781b744facb121b05
Change-Id: I26ada6da95a8b3547de9e54781b744facb121b05
This reverts commit f2685e5ccf.
Original commit broke building sdk/ndk in post submit.
Fixed with small patch in build/soong
Test: m general-tests
Test: IST_DIR=/usr/local/google/dist/bug TARGET_RELEASE=trunk_staging TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: I47e39913878219adec6471a474e3c238c4bdeed1
Revert submission 3060229-ron-tmc-symlinks
Reason for revert: Droidmonitor created revert due to b/344045516
Reverted changes: /q/submissionid:3060229-ron-tmc-symlinks
Change-Id: Ic471df68c3ebdeb368eac9549446ee50b17d7c2f
The module `test_module_config` will be installing symlinks in the
testcases directory pointing back to the `base` test for .apk files.
This saves a gigs of space on disk and in suite zip files.
However, the .mk files were using LOCAL_COMPATIBILITY_SUPPORT_FILE to
do two things:
1) copy the file from intermediates to testcases
2) package the testcases files in zips.
Because the test_module_config rule is taking care of 1), we need a new
variable to do just 2)
Test: m general-tests device-tests
Change-Id: Icdad4401cde27d8edd5e13e486b96c62817a4bbb
LOCAL_SOONG_LOGTAGS_FILES is similar to LOCAL_LOGTAGS_FILES but it uses
full paths rather than relative paths, to correctly support Soong's
`android:"path"` which may produce paths outside module directories.
Bug: 336189540
Test: m out/soong/.intermediates/all-event-log-tags.txt
Test: m out/target/common/obj/all-event-log-tags.txt
Change-Id: I129b96f3e06036ded76d2657e25e895f8c946cfb
The original behvaior will not install related files define in
LOCAL_SOONG_INSTALL_PAIRS due to there's no dependency information in
make, this CL parse the string from each LOCAL_SOONG_INSTALL_PAIRS after
':' as dependencies.
Bug: 333974089
Test: apply aosp/3041672 ; m hyph-lic
Change-Id: I79050e99c3e63f58cfd32db270c909a76bd96801
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2da2e2027ccabbcfbb444abc6828addeb3b22e13
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Icfd1707953eba2e29044468ab6728b39d7998048
Record LOCAL_ACONFIG_FILES when LOCAL_SOONG_MODULE_INFO_JSON is defined.
Bug: b/308625757
Test: out/soong/module-info-${TARGET_PRODUCT}.json is unchanged
Test: fixes some aconfig flags.
Change-Id: I7ca9d2723e38ec5588bc6ada8769320a0b63bcb5
This change disallows Java modules in the vendor partition to use System
SDK that is newer than API level 34; 34 is the latest allowed.
Background 1: with Trunk Stable, the system/vendor interface is released
at Q2 whereas the system/app interface is released at Q3. In other
words, at Q2, the APIs which will be added to the system SDK at Q3 are
not available. Since the system/vendor interface (which is fronzen at
Q2) is what the modules in the vendor partition will be building
against, they can't and shouldn't use those new APIs that will be added
in the future (Q3). Using those APIs is risky because there's a chance
that those APIs get removed or changed between Q2 and Q3. For example,
2024 Q2 is technically still Android U, not Android V.
Background 2: The use of Java APIs in the vendor partition had many
issues. Most significantly, those "vendor" Java apps are categorized as
part of the system partition because all Java app processes require
access to platform internal libraries that are prohibited to vendor
processes. Furthermore, since the Project Treble, the vendor partition
was re-purposed to a partition to host SoC-dependent bits - usually
HALs. Implementing HALs in Java has never been officially supported and
has had many loop holes.
We'd like to use both background 1 and 2 as a chance to disallow any
Java code in the vendor partition. However, since there are already some
Java modules in the partition, we can't suddenly ban it. The deprecation
will be made gradually, and this CL is the start.
This CL implements the "Make" part of the restriction. The "Soong" part
will follow.
Note that LOCAL_SDK_VERSION := current or LOCAL_SDK_VERSION :=
system_current is automatically overridden into 34 or system_34. This is
to prevent sudden breakage of vendor modules that have been targetting
the latest (i.e. current) API level. They will however fail if they use
APIs newer than API level 34.
Bug: 314011075
Test: The following Android.mk module fails as expected.
some/Android.mk:
include $(CLEAR_VARS)
LOCAL_MODULE := example_module
LOCAL_VENDOR_MODULE := true
LOCAL_SDK_VERSION := system_35
LOCAL_SRC_FILES := Foo.java
include $(BUILD_JAVA_LIBRARY)
FAILED:
some/Android.mk: error: example_module: Incompatible
LOCAL_SDK_VERSION 'system_35'. System SDK version '35' is not supported.
Supported versions are: 28 29 30 31 32 33 34
Change-Id: I44c29c6dc45b91a9a30b8a21cd2baae685fa27fb
Allow Soong modules to generate their own module-info.json entries
by merging Soong's module-info.json file into the one generated in
Make.
Skip collecting unnecessary ALL_MODULES.$(my_register_name).*
that are only used for module-info.json if the module was already
handled by Soong via the LOCAL_SOONG_MODULE_INFO_JSON property.
Bug: 309006256
Test: Compare module-info.json
Change-Id: I2c9db3c7c7bae7bd6cb889d7ebc2e383c278c82d
Soong is now handling installing init.rc and vintf fragment files,
don't install them in Make for Soong modules.
Bug: 309006256
Test: Compare installed files
Change-Id: Ied43c207c6ae158d3f41d81c7fe16688331bf13c
The format of LOCAL_TEST_DATA when provided by Soong can included a
third colon-separated field with an extra relative path that is not
being handled when assigning to ALL_MODULES.$(my_register_name).TEST_DATA.
Use my_test_data_file_pairs instead, which has already been transformed
to a src:dest pair.
Bug: 311428265
Test: examine module-info.json
Change-Id: I3a089cc24ea1492f1f7cf891c73ee7b43f273bb3
Soong has already created the test data installation rules. Make still
handles packaging the test data into test suites.
Bug: 311428265
Test: atest --host toybox-gtests --test-timeout=120000
Change-Id: Ida0469e600b1dec4ce4e450a6c517ae13c133ded
ALL_DEPS was original stored in ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS for
use by the old licensing code. That has been removed, and it is now
only used by module-info.json. Storing it with $(LOCAL_MODULE) causes
_32 entries in module-info.json to be missing dependencies, and causes
the dependencies from _32 variants to be squashed into the normal
variants. Replace ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS with
ALL_MODULES.$(my_register_name).ALL_DEPS.
Test: builds
Change-Id: Ieddfcddd8547b61bd938ae051beb738268aac5af
Nothing ever reads ALL_DEPS.*.LICENSE, and its an ever-growing list
that is sorted every time, which is extremely expensive.
notice_target is never set after I4cddf9a381a1258bdc2b1b42be72c447df10d234,
remove all the related code.
Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I0fa6a46e62ef8aa78873b43d3064b57b1c54de51
Only LOCAL_MODULE_TAGS := tests is used is meaningful in the current
implementation. "optional" and "samples" both exist in the tree, but
are meaningless. "gnu", "user", "eng" and "debug" are no longer used,
and are already forbidden by the unusual tags check. The info from the
"module" target is now available in module-info.json. Delete all the
irrelevant code.
Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I04e8178a362e382a1a4bd997c1b4c3a480db7714
Instead of listing all apexes in the source tree, now each apex emits
its own fragment for apexkeys.txt, which is pointed by
LOCAL_APEX_KEYS_FILE. Makefile collects apexkeys.txt from installed apex
files. This is to avoid listing unrelated apexes (not installed,
testdata, unexported namespaces, etc.)
Bug: 304914238
Test: m apexkeys.txt
Test: m blueprint-tests
Change-Id: I6b5601609d16452a0717f09ecaa703ee09693094
LOCAL_SOONG_INSTALL_SYMLINKS can now be set by the install_symlink
module type. The install_symlink module type doesn't set
LOCAL_SOONG_INSTALLED_MODULE because make tries to copy that file
around, which doesn't work with a symlink.
Bug: 205632228
Test: built and ran the emulator observed the /system/bin/hwservicemanager symlink is still there
Change-Id: I1ec355b5ae057d0b7fe167674d70da6a4d03f6b5
A change is being made to properly track apex compat symlinks in
the installation logic, which causes the artifact path requirements
to start complaining about them. Exclude them from the artifact path
requirements.
Bug: 205632228
Test: m nothing
Change-Id: Ie975b7450574d41bb13bb2179edc31ba4edd413e
When a vintf_fragments or init_rc file is shared by two modules,
unintended modules are installed due to the shared file.
This was caused by add-all-target-to-target-required-modules-deps.
With the following definitions:
cc_binary {
name: "foo",
vintf_fragments: ["shared.xml"],
required: ["foo-req"],
}
cc_binary {
name: "bar",
vintf_fragments: ["shared.xml"],
}
When installing "bar", surprisingly, "foo-req" is installed due to the
link between "shared.xml" and "foo-req" added by
add-all-target-to-target-required-modules-deps.
To fix that, in this change, vintf_fragments and init_rc files are
marked as "order-only" deps. In
add-all-target-to-target-required-modules-deps, order-only deps are not
used to add links to "required" modules.
Now, with the same definitions, installing "bar" won't installs
"foo-req".
Bug: 198818343
Test: (see above)
Change-Id: I16be0dcb84564c559cb2f4223e2812321ee14729
Even though `m foo` installs vintf_fragments and init_rc files. There
was no direct dependency from the installed target to
vintf_fragments/init_rc files.
With the following:
cc_binary {
name: "foo",
vintf_fragments: ["foo.xml"]
}
`m out/target/product/vsoc_x86_64/system/bin/foo` didn't install
foo.xml.
This change adds the order-only deps from the target install to
vintf_fragments/init_fc files.
Bug: 198818343
Test: (see above)
Change-Id: I4656d43d15407a85fea7c95b22e4bbe19fb86aee
Vintf_fragments should be installed regardless when they are shared with
other modules or not.
cc_binary {
name: "foo",
vintf_fragments: ["shared.xml"],
}
cc_binary {
name: "bar",
vintf_fragments: ["shared.xml"],
}
Either `m bar` or `m foo` should install `shared.xml`.
Previously, only *new* vintf_fragments were installed, which means, one
of "foo" or "bar" didn't trigger the installation of "shared.xml".
Bug: 198818343
Test: (see above)
Change-Id: I52b831df046b585db41449f06a6f9c684d623468
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