Enable the kotlin-annotation-processing plugin and pass annotation
processors to it.
Bug: 122251693
Test: m checkbuild
Test: TestKapt in kotlin_test.go
Change-Id: I841df454beaaa7edd263eea714ca0d958a03c9de
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.
Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: I622521d59979a6b01ecc8065a278412fedf7b9bc
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong. This fixes an issue where dexpreopting was happening on
a different jar than was being installed.
Bug: 122856783
Test: m checkbuild
Test: no change out/target/common/obj/PACKAGING/hiddenapi-flags.csv
Test: only ordering change to out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Test: cts/tests/signature/runSignatureTests.sh
Change-Id: I4fc481efc29e73cb2bdaacf672e86d5f6f0075ae
Soong was incorrectly creating symlinks by not making the link target
relative to the link location. This caused symlink_prefered_arch to
not work when run with --skip-make.
Test: ALLOW_MISSING_DEPENDENCIES=true OUT_DIR=out DIST_DIR=out/dist \
./art/tools/dist_linux_bionic.sh -j80 com.android.runtime.host dex2oatd
ls -l out/host/linux_bionic-x86/bin
Change-Id: I0ae5f059d19c0eec53e4d7c8dc68ae890980e6b4
This change adds Fuchsia as a valid OS. Future changes
will add proper toolchain support.
Bug: 119831161
Test: Compile walleye. Confirm that adding `fuchsia` to the
os-specific declaration of an arbitrary target does not throw
a build error.
Change-Id: I64eb928afb7512f3fbe32abb313b4c3efe16b169
This enables using arch-dependent property values in modules defined in
android/.
Bug: 122332178
Test: Soong tests + TreeHugger
Change-Id: I89869e395fabf0e69f505b77eab8a4221384124e
This enables execute-only memory (XOM) layouts to be used by default in
the build system. As of now, there's only support for ARM64 devices, so
this only affects those. Since userland XOM requires kernel support,
devices without the necessary support will continue to allow pages
marked execute-only to be read and they should be unaffected by this.
Bug: 77958880
Test: Device with and without kernel support boot.
Test: Binary throws segfault when reading from XOM on supported device.
Test: Debugger works and stack traces are still generated correctly.
Test: Teamfooding, stable during regular usage.
Change-Id: Ifc7438cd242a824db441b8d557454d1c3cc81eeb
The minimum set of supported features are different between Android and
Linux with X86_64. So while the list of variants and features are still
technically correct, and may be shared more in the future, the default
needs to be configured differently.
Bug: 120208462
Test: add `host_supported: true` to libopus; m libopus
Change-Id: Ib79707d17b852f77341026085230c026b6386b78
Java binary modules expect the order of modules in Soong's Android.mk
to match the variant order. Instead of sorting by name and then
subdir, which will alphabetize the variants, only sort by name and
use sort.Stable to keep the ordering of modules with the same name.
Test: m
Change-Id: Icf3d22bdc9f9c73945d01c2c47468cc1c361035d
When PRODUCT_DEFAULT_DEV_CERTIFICATE is set to /vendor/foo/devkeys/test,
then the public/private key pairs for an apex_key is searched at
/vendor/foo/devkeys directory.
To be specific,
/system/timezone/Android.bp:
apex_key {
name: "timezone.key",
public_key: "com.android.tzdata.avbpubkey",
private_key: "com.android.tzdata.pem",
}
When PRODUCT_DEFAULT_DEV_CERTIFICATE isn't set, the keys are searched at
/system/timezone, which is the path where Android.bp is located.
With PRODUCT_DEFAULT_DEV_CERTIFICATE set to /vendor/foo/devkeys/test,
the keys are searched at /vendor/foo/devkeys.
Bug: 121224311
Test: m (apex_test updated)
Test: m with crosshatch (PRODUCT_DEFAULT_DEV_CERTIFICATE is set to
/vendor/google/...)
Test: m with cheets (PRODUCT_DEFAULT_DEV_CERTIFICATE is set, but there
is no apex key there. The product is with TARGET_FLATTEN_APEX := true)
Change-Id: I213bbb96c433d851f9cc982871459fd7fb4fe47d
Only if enforcement option is enable, it makes build error when there is apk located at system partition but signed with system certificate.
Bug: 74699609
Test: m -j
Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.
<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release
Note that, in case of APEXes, the manifest name refers to the name of
the zip container. The apex manifest name (which is specified in
apex_manifest.json) is not overridden.
Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified
Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
Add methods to TestingModule that return an empty BuildParams instead
of panicking, which can be used to test if a module has a matching
rule. Also add godoc to the TestingModule methods.
Test: m
Change-Id: Iea2ab9be57d3f3f60437041f4e5a7e2100e1fe48
This solves a problem where javac fails to find patch-module targets
when a build diretory is not under the project root.
Bug: 117770838
Test: java_test.go + manual build
Change-Id: If70d0d388a3f6c87b3f78a927df2063616d50c8a
This commit renames `_platform` suffix to `` (empty string) so that
non-apex variations are not renamed to `_core_shared_platform` or
`_vendor_shared_platform`.
This commit makes sure that `_core_shared` and `_vendor_shared` is
always under `$OUT_DIR/soong` regardless the usages from apex modules.
Furthermore, this avoids the confusing stale lsdump files (e.g. both
`_core_shared` and `_core_shared_platform exist) while creating
reference ABI dumps for VNDK ABI checks.
Bug: 121986692
Test: lunch aosp_arm64-userdebug; make # no more _platform variants.
Change-Id: Ic02a60ac45f982580349661c22331d114617fd92
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.
Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I45a40a335483dae2fe192721df9b31bdbab97ee5
Port the dexpreopt logic from Make to the dexpreopt package in Soong,
and use it to dexpreopt Soong modules. The same package is also
compiled into the dexpreopt_gen binary to generate dexpreopt scripts
for Make modules.
This relands Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb and
I462182638bd57b1367b5bfb0718e975c11ae66f7, along with multiple fixes
to depsfile generation in dexpreopt_gen that caused .odex files for
modules in defined make to be missing dependencies on boot.art, and
a fix to not dexpreopt and strip tests.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Test: OUT_DIR=$PWD/out m
Test: NINJA_ARGS="-t deps out/target/product/sailfish/obj/APPS/Contacts_intermediates/dexpreopt.zip" m
Change-Id: I6bb2c971cee65d2338839753aa0d84939f335b1b
MaybeRel was failing with an error when comparing an absolute out
path to a relative source path. Make it return false instead, and
add tests.
Bug: 119412419
Test: paths_test.go
Change-Id: I462182638bd57b1367b5bfb0718e975c11ae66f7
Port the dexpreopt logic from Make to the dexpreopt package in Soong,
and use it to dexpreopt Soong modules. The same package is also
compiled into the dexpreopt_gen binary to generate dexpreopt scripts
for Make modules.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb
This change fixes a problem that APEX variations are created for the
modules that actually shouldn't built for any APEX. For example,
consider this case.
apex { name: "myapex", native_shared_libs: ["mylib"],}
cc_library { name: "mylib", shared_libs: ["libfoo#10"],}
cc_library { name: "libfoo",
shared_libs: ["libbar"],
stubs: { versions: ["10"], }, }
cc_library { name: "libbar", ...}
Before this change, both the stubs and non-stubs variations of libfoo
were mutated with apexMuator, which is incorrect for the non-stubs
varia; there is no dependency chain from the apex "myapex" to the
non-stubs variation, but to the stubs variation due to the #10 syntax.
This was happening becauses we used the name of the module to determine
whether it should be built for APEX or not. Both stubs and non-stubs
variations have the same module name "libfoo".
Fixing this issue by recording the list of APEX variations required
directly on the module. So, the stubs variation of libfoo has myapex in
its apex variations list, but the non-stubs variation doesn't, and thus
apexMutator does not pick up the non-stubs variation.
Test: m (apex_test updated and passing)
Test: cherry-pick ag/5747464 and m
Change-Id: I31e618626809a828a55fff513ef5f81f79637afa
When the stubs variant of a library is dependend by a platform component
and the library is included in one or more APEX, the library is not
installed to the platform, because it is provided by APEX.
Bug: 120266448
Test: m
Test: add stubs: { versions: ["1"], }, to libnetd_resolv
then build netd. libnetd_resolv.so does not exist under /system.
Change-Id: I09b78e38df285033ef6e9c85f7ea4b0274e85070
When a native module is built for an APEX and is depending on a native
library having stubs (i.e. stubs.versions property is set), the stubs
variant is used unless the dependent lib is directly included in the
same APEX with the depending module.
Example:
apex {
name: "myapex",
native_shared_libs: ["libX", "libY"],
}
cc_library {
name: "libX",
shared_libs: ["libY", "libZ"],
}
cc_library {
name: "libY",
stubs: { versions: ["1", "2"], },
}
cc_library {
name: "libZ",
stubs: { versions: ["1", "2"], },
}
In this case, libX is linking to the impl variant of libY (that provides
private APIs) while libY is linking to the version 2 stubs of libZ. This is
because libY is directly included in the same apex via
native_shared_libs property, but libZ isn't.
Bug: 112672359
Test: apex_test added
Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
Draft APIs are available to the platform and to CTS to allow
developers to iterate on an API, but hidden from the NDK artifacts to
avoid releasing the API until it is ready.
Test: Mark binder_ndk headers and library as drafts, make checkbuild,
build-ndk-prebuilts.sh, verify missing from NDK artifact.
Bug: http://b/120091134
Change-Id: I8685e92bdaaea581e17fe98e7a2bfb9388f9f132
Also, replace all notice file references with the parent directory
pattern(../) with filegroups. This new version has
ALLOW_MISSING_DEPENDENCIES support, so shouldn't break branches that
don't contain the libwinpthread project.
Bug: 118899640
Test: Manual build + forrest runs on previously failed branches.
Change-Id: I13e70e8dab547f82c1c8f15eccc7ae116e480ad5
Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new xom module property. Also adds
support for an ENABLE_XOM build flag for global builds.
Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: Ia2ea981498dd12941aaf5ca807648ae37527e3ee
Support Kryo 385 cpu variant which should be used for
Qualcomm Snapdragon 845.
Motivation:
kryo385 CPU *IS NOT* an Arm Cortex-A75.
Particular problem:
Cortex-A75 CPU must support optional ARMv8.2 dot product
feature; kryo385 CPU (Qualcomm Snapdragon 845) doesn't
support it.
Test: Builds when kryo385 is used as cpu variant.
Test: Pixel 3 boots to GUI with kryo385 as CPU variant
with this patch on AOSP 9.0.0 r16.
Bug: 119564566
Change-Id: I62ffb46b1977b48446c6c1ca1400b1b39f7a8457
These are enough to compile bootanimation with Soong.
Test: build bootanimation on internal branch
Change-Id: I8474b54ea196ab71ce178c517eb261bdc22b2e01