Similar to native:vendor, native:product can use VNDK libs but not
vndk_private.
It is activated when PRODUCT_PRODUCT_VNDK_VERSION is set.
Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: Icfd94dfc30e77581991799d9e2f408f57da22cea
Use codename.fingerprint format for minSdkVersion if it is unset
in the manifest and
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.
BUG: 130541924
The test lists keep getting out of date. Add a per-caller option so that
once they're clean on all builds we can stop them from regressing.
Test: add my_modules_strict := {true,false,,foo} to user
Change-Id: I3e09a8cbe5a07bbbff042b26cea7041c331dde96
Set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE true if
1. PRODUCT_SHIPPING_API_LEVEL > 29
2. OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set
Bug: 147711383
Test: Set PRODUCT_SHIPPING_API_LEVEL higher than 29, m nothing
Change-Id: Ib6aa2fd908b4bc13e3f759a07ece0e60dd3cc12f
Previously, we only check VNDK core and vendor variants are identical
when a VNDK library is not declared to have different variants AND the
target has TARGET_VNDK_USE_CORE_VARIANT set. Therefore, it is fairly
easily to break a TARGET_VNDK_USE_CORE_VARIANT target as it needs to be
tested explicitly.
This change uses the new LOCAL_CHECK_SAME_VNDK_VARIANTS and expands the
check to run regardless of TARGET_VNDK_USE_CORE_VARIANT. Also adds
support for VNDK-in-product.
Bug: 145157349
Test: Build success for targets with and without
TARGET_VNDK_USE_CORE_VARIANT.
Test: With the corresponding change in build/make, remove libbinder
from build/soong/cc/config/vndk.go and check build fails even
when TARGET_VNDK_USE_CORE_VARIANT is not set.
Change-Id: Iec708b971072e6580f77a03e243b30b89b3b054d
Resource configs should not be deduped when building RROs since it
would be impossible to override some resource configs with the same
value as the default config. Also, aapt2 removes resources that do not
have default configurations. If an overlay attempts to overlay a
non-default configuration without overlaying the default, the resource
will be removed and the value will not be overlaid at all.
Bug: 146227008
Test: m-j
Change-Id: I1465b599cbf7f464d1b5b75a87e7dafa2cf734b0
Building device_manifest.xml or device_compatibility_matrix.xml only
builds vendor manifest / matrices, but not all device manifest /
matrices (e.g. vintf_fragments, ODM manifest, etc.). Make the name more
accurate.
Test: m check-vintf-all
Change-Id: Ib017507c421355263d53a9e5b357f169c77da36d
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.
Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.
Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails
Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
There are currently no classes on the bootclasspath that live in the
unnamed package (empty package name). This CL explicitly forbids it.
This has the side effect of guarding against some classes of bugs,
for example R8 has functionality to generate some helper classes in
the unnamed package that should not be on the to bootclasspath
because they would hide corresponding classes in Applications.
Strictly speaking I believe that the "not package_name or " part
of the condition in the touched script is not needed because
LoadWhitelist() already skips empty lines and doesn't add "^$" to
the whitelist regex, but relying on this seems very fragile. If
there ever is a need to have classes in the bootclasspath's
unnamed package in future then we can always change this again.
Bug: 147480264
Test: Treehugger
Change-Id: Ic310dd0779dde133b3a5c3039ea5b70d31331a9b
PRODUCT_PRODUCT_VNDK_VERSION will be automatically set to true for
the devices with PRODUCT_SHIPPING_API_LEVEL newer than 29.
Bug: 146621746
Test: build with PRODUCT_SHIPPING_API_LEVEL set to 30
Change-Id: I78cd81d1d61e9089b163169bc495df8a880463da
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:
- Doesn't require a full build
- Won't run for system-only AOSP targets
A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.
(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)
Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
manifests
Test: change manifest.xml to be incompatible and m check-vintf-all fails
Bug: 140280874
Bug: 140360109
Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
Jars in APEXes have Make module names <jar_name>.<apex_name>. e.g.
updatable-apex.com.android.media. Previously, we have used <jar_name>
which actually meant the platform variant of the jar. This is not only
incorrect, but also is causing problem as the platform variant is no
longer available when the jar is configured to be available only for the
corresponding APEX (via the apex_available property).
Fixing the problem by correctly using <jar_name>.<apex_name> scheme.
Bug: N/A
Test: m
Change-Id: I6e255ce88c9bd80120b29197fb2637a64010f531
Merged-In: I6e255ce88c9bd80120b29197fb2637a64010f531
jacoco-report-classes-all.jar now depends on all installed files
including apks in /apex. Previously, it depended only on files under
system.img and as a result jacoco for other partitions were missing.
Bug: 147296855
Test: m
Change-Id: I755de1205ebc43c197af36a13cca5f4b49e275e8
They are now created from Soong, and therefore put in a separate config file
out/soong/dexpreopt_soong.config.
Test: m
Bug: 145934348
Change-Id: I27e710f09c37e64e8975b8e763d13434e5de71b3
Now that ninja uses lstat and can support installing arbitrary symlinks,
switch jni lib symlinks from LOCAL_POST_INSTALL_CMDS to real rules.
Bug: 128577186
Test: List of files under PRODUCT_OUT is the same before/after this change
Test: out/target/product/generic/.installable_files now includes the symlinks
Test: m installclean; m NfcNci -> symlinks installed with correct dest
Test: m NfcNci; m NfcNci -> ninja: no work to do
Change-Id: I078dca53ab3d93f74c36fa66d5577e6e3e0640d6
Earlier CL Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 introduced
Soong-generated Make variable 'DEXPREOPT_IMAGE_LOCATIONS'. That CL was
erroneous in that it did not take JIT-zygote config into account and
generated identical location for "boot" and "apex" boot images.
This caused build breakages, because in case of JIT-zygote config the
two variables 'DexPreoptImages' and 'DexPreoptImageLocations' in the
module's dexpreopt.config were out of sync: 'DexPreoptImages' was
for the "apex" image, and 'DexPreoptImageLocations' was for the "boot"
image.
CL I9a91fc48e54d7d43abec2cb2b5a11e3581db380b introduced a workaround
for this problem: incorrect 'DexPreoptImageLocations' from the module
dexpreopt.config was ignored, and instead boot image location was
manually reconstructed from 'DexPreoptImages'. This workaround would
not work when we start using boot image extension and location will
become more complex.
This CL fixes the way 'DexPreoptImageLocations' is generated by
spliting the 'DEXPREOPT_IMAGE_LOCATIONS' variable in two variables
depending on the boot image flavour "boot" of "apex". This is
aligned with the way other similar variables are generated.
Test: aosp_walleye-userdebug boots.
Test: walleye_jitzygote-userdebug builds
(on git_rvc-release branch with this CL cherry-picked).
Change-Id: I449c968909635dd8cc431323fccbc7fce440fea5
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.
Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
These are a (partial) list of files that we'd install with a default
build. The idea is that if something is removed from this list, soong_ui
can remove it from the installed location before running ninja.
It's okay if there are things missing from this list, it's not intended
to be a 100% solution replacing installclean / CleanSpec.mk, just
something that handles 80% of the cases without user involvement.
In particular, if something is removed from PRODUCT_PACKAGES, we'll
remove it from disk, but not necessarily rebuild the image files. That's
the same as most use cases of CleanSpec.mk today, and often some other
change will trigger the necessary images to be rebuilt.
We should be able to fix that by changing all of the image creation
rules to depend on the (partial) list of files they care about, or by
fixing ninja to rebuild things when their list of dependencies change.
(Other tools run into this same problem)
The list of test files is also included so that we can remove obsolete
tests from their "installed" locations within test suites and the
testcases folders.
Test: remove a module from PRODUCT_PACKAGES, see the print and file removed
Test: change the name of a cts test, see the old one removed from cts
Change-Id: I67f270a6713369099ca523aaf991ee3beb815c0a
See the Changes.md and the paired soong change for more information.
Test: Add BUILD_BROKEN_NINJA_USES_ENV_VARS := OLDPWD
ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Change-Id: I2167eac52166b513318bc48feb71c9d0b80e5fd4
android_app and android_test modules were not built as part of
javac-check, which resulted in not running them in the Error Prone
build.
Fixes: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I278d7ee0cdc3f49aa8fa4d4f13309e29d700f2ba
My change to clean up obsolete copy headers would remove valid ones if
thhe LOCAL_COPY_HEADERS_TO path wasn't cleaned. I'm seeing this most
with values that just end in '/', so we end up with a '//' in the path,
which isn't textually equivalent, and we remove it.
Test: No longer seeing constant removals on internal products
Test: Set LOCAL_COPY_HEADERS_TO := ..
Test: Set LOCAL_COPY_HEADERS_TO := ../foo
Test: Set LOCAL_COPY_HEADERS_TO := /foo
Change-Id: Idbeeb207a2bb2a8da766473dbded877cec7c9cc1
Use ro.product.vndk.version to show the VNDK version that the product
partition is using.
When PRODUCT_PRODUCT_VNDK_VERSION is set, add ro.product.vndk.version
in /product/build.prop.
If PRODUCT_PRODUCT_VNDK_VERSION is "current", ro.product.vndk.version
will have the VNDK version in PLATFORM_VNDK_VERSION. Otherwise, it
will have the value defined in PRODUCT_PRODUCT_VNDK_VERSION.
Bug: 144534640
Test: Check if /product/build.prop has "ro.product.vndk.version"
Change-Id: If5e7e3a6c155de45f88f68700f16175656896afe
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.
Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.
Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
The test was to ensure that bionic libs are not installed to the
non-updatable part of the platform (e.g. system/lib). However, for
bionic libs, we actually have been installing them for bootstrapping.
Specifically, they are installed to /system/lib/bootstrap, not
/system/lib. The test has passed just because it didn't look into
/system/lib/bootstrap. Removing the unnecessary check.
Bug: 128708192
Bug: 133140750
Test: m
Test: m out/target/prduct/$(TARGET_DEVICE)/system/lib/libc.so doesn't
work
Change-Id: I93cbd74972cdd2daea45612136d5133fa49ab76a
PRODUCT_PRODUCT_VNDK_VERSION sets the VNDK version for product
partition. It may have "current" to use the PLATFORM_VNDK_VERSION.
If PRODUCT_PRODUCT_VNDK_VERSION is set, the native modules in product
partition are enforced to use VNDK's only from the system partition
as BOARD_VNDK_VERSION did to vendor partition.
Bug: 144534640
Test: build
Change-Id: I7ea148f0f8b7e44be7810adcacb30702d66831f1
Use apex_available property to prevent modules that are only for the
NN apex from being used outside of the APEX.
Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I57fe857d99088ef08e065dd2a3fc5a9389b6eb0f
Use apex_available property to prevent modules that are only for the
conscrypt apex from being used outside of the APEX.
Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I08ca6cd8e5e4a254d9dd62695ee3ed317503d874
Original Commit Message:
"""
Rename modules that are APEX-only
The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""
Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.
Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property
Change-Id: I8961702cfb414ebec55014f57e0be3347b34cea9
Original Commit Message:
"""
Rename modules that are APEX-only
The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""
Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.
Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property
Change-Id: I39316f9ef2b0cd6c0a347f6b51d011748d0681aa
When setting target out path at root(/product, /system_ext), either file
system type or prebuilt image must be set. If not, we'd rather raise an
error.
Without raising an error, the artifacts in these directory are not
included in any image.
And also, extract these logics into function, and check product, odm, system_ext
For now, exempt vendor image because of some targets with prebuilt
vendor image.
Bug: 137169253
Test: set TARGET_COPY_OUT_PRODUCT := product
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE :=
BOARD_PREBUILT_PRODUCTIMAGE :=
and then check if it causes an error.
Test: set TARGET_COPY_OUT_PRODUCT := system/product
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 or
BOARD_PREBUILT_PRODUCTIMAGE := someimage.img
and then check if it causes an error.
Change-Id: Ibf0f7838111075ba3649e198e5649aa7e8e29d7c
JAR libraries in the ART and conscrypt APEXes are no longer built for
the platform. Therefore, the path out/target/common/<name>_intermediates
does not exist. Instead use the path
out/target/common/<libname>.<apexname>_intermediates paths for those
APEX-only jars.
Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I5fb725403ac22198e5ce6d77ca97c5f3392fabfd
Use apex_available property to prevent modules that are only for the ART
apex from being used outside of the APEX.
Bug: 128708192
Bug: 133140750
Bug: 129006418
Test: m
Test: m libnativeloader doesn't install anything. (because it doesn't
have "//apex_available:platform".
Test: Add "libnativeloader" to shared_libs of "libvndksupport" which is
installed to /system/lib. Then the build fails with following error:
error: system/core/libvndksupport/Android.bp:3:1: module
"libvndksupport" variant "android_arm_armv8-a_core_shared": depends on
//art/libnativeloader:libnativeloader which is not visible to this
module
Change-Id: I964d0125cfedb454a60c098bf1a1797201d5dd40
Also, prefer
-Wl,--execute-only
rather than
-Wl,-execute-only
Bug: 139945549
Bug: 146144180
Test: m
Change-Id: I4a07978c7a84a0a7e841b9e059305b0f443d0e95
Suggested-by: Ryan Prichard <rprichard@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
So that soong_ui can remove obsolete headers that have been removed.
Test: cat out/target/product/crosshatch/.copied_headers_list
Test: cat out/target/product/generic/.copied_headers_list
Change-Id: I7df8029c1f2ed630d35c357f94e5dfb668e5824f
Id938aa35e87c9c69769a3184dfea06fd02299688 removed the initial
assignment to common_proguard_flags, which both makes it grow as
each module is parsed and also turns it into a lazily evaluated
variable. That causes the flags passed to R8 to be the flags
computed for the current module multiplied by the number of previously
parsed modules.
Fixes: 146150575
Test: m checkbuild
Change-Id: I87c9625496f482896be6867124f2f12ff662cd57
For GSI targets, this variable is set true, and Soong will install both
"flattened" and "unflattened" APEXes together in /system_ext and /system
respectively.
Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
resulting apex images under /system/apex
and flattened apexes under /system/system_ext/apex
Change-Id: Ib72d1b9dbd59727942da39323ee7e60ac6e14882
Bug: 143513520
Test: `make vbmetaimage-nodeps` then checks the value of
PRIVATE_AVB_VBMETA_SIGNING_ARGS appears in ./out/verbose.log.gz
Change-Id: I2eac2b2d319a46f3c3ecb56df8c6b56925a4d596
java-lib-header-files (turbine) differ from java-lib-files (actual metalava
output) in how the private constructors are showing up in these jars.
in classes.jar android/telephony/AccessNetworkConstants.class
package android.telephony;
public final class AccessNetworkConstants {
private AccessNetworkConstants() {
throw new RuntimeException("Stub!");
}
}
in classes-header.jar android/telephony/AccessNetworkConstants.class
package android.telephony;
public final class AccessNetworkConstants {
}
As you can see, turbine seems to skip adding the private constructor,
which means that it becomes public.
Bug: 145933077
Test: m out/target/common/obj/api.xml
out/target/common/obj/api.xml -> no longer has public constructor
for AccessNetworkConstants
Change-Id: Ie1763783667b41b9892c9c47e6b362d7962caf14
This commit enables prebuilt ELF checks on ALL targets.
If this commit breaks your target, you may triage the breakage by adding
the following setting to your `BoardConfig.mk`:
BUILD_BROKEN_PREBUILT_ELF_FILES := true
And then fix the problem with the instructions:
https://source.android.com/devices/architecture/vndk/abi-use-check
Bug: 141176116
Bug: 145925470
Test: for t in ${ALL_TARGETS}; do lunch $t; make check-elf-files; done
Change-Id: I62e0269074afe1d685cb63d5f8953a2acf03f03e