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
When dist'ing a library or binary that has use_version_lib set, always
distribute the stamped version, even for the device.
Test: m test_build_version_test dist
Change-Id: I2995ec516b1d182ce18f099aeaa4d186ffbcf01f
Also, replace all notice file references with the parent directory
pattern(../) with filegroups.
Bug: 118899640
Test: Manual build
Change-Id: I841345d747f41a3bb5beea66ad87a979734c39a4
This reverts commit 555c114283.
Reason for revert: The namespace issue in the pi-dev-plus-aosp-without-vendor branch is now fixed.
Change-Id: I26ed591447797a8ee505f43bdd209162418b6c5e
When TARGET_FLATTEN_APEX is set to true, APEXes are flattened, which
means files in an APEX is not packaged into the mini file system image,
but instead directly copied to the system partition.
This option is for devices where kernel does not support loopback
devices or the maximum number of loopback devices is too small (though
the threshold is TBD as of now).
This CL also fixes a bug that jars having bytecode are installed instead
of those having dex.
Bug: 118485880
Test: TARGET_FLATTEN_APEX=true m apex.test; tree
out/target/product/.../system/apex/apex.test shows list of files in it.
Test; m apex.test, then a file out/target/product/.../system/apex/apex
.test.apex exists.
Change-Id: I5a3d62d392d05f2779c4925388afe4f6e460059b
Base name of the output file of a prebuilt_etc is by default the module
name. This default behavior can be customized by either via the
'filename' property or the new 'filename_from_src' property. The former
explicitly sets the base name while the latter makes the file name to be
that of the source file.
Test: m (prebuilt_etc_test added)
Change-Id: Ic2900417bda62993f6de2612d993234b82b74479
Arch property struct types are created at runtime. Go has a limit
of 2**16 bytes for the name of a type, and the type of a struct
created at runtime is a string containing all the names and types
of its fields. To avoid going over the limit, split the runtime
created structs into multiple shards.
Also undo MoreBaseLinkerProperties now that it is no longer
required.
Bug: 80437643
Test: m checkbuild
Test: no change to out/soong/build.ninja
Change-Id: I035b20332ec63f3d4b1696855c5b0b0a810597b7
Protobuf 3.5.2 does not natively support lite protos, instead they
are generated by the protoc-gen-javalite plugin compiled from
external/protobuf-javalite.
Bug: 117607748
Test: m checkbuild
Change-Id: I95c2d873f19d4c00e9dc312d7fdbe98cae250a8b
Export static libraries through LOCAL_STATIC_LIBRARIES and
LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file
generation. Also, add a notice property in the libwinpthread module.
Bug: 36073965
Test: cc_test.go
Change-Id: Ic63ca523b40acac82bbe876f7aa40ecd495907c5
For APEXs, we need different prebuilt_etc modules having the same
'filename' properties, because we expect them to have same local path
inside APEXs. For example, we will have ./etc/ld.config.txt file for
APEXs having an executable.
However, this can cause duplicated targets in the make world, because
the prebuilt_etc modules will all be installed to the same path under
/system.
In order to avoid this, adding 'installable' property to prebuilt_etc
module type to optionally make a module to be non-installable, but only
to APEXs.
Test: build/soong/build_test.bash --dist
Change-Id: Iadb564e07d0483934548ca63f5f524a2c8515a81
filename property is an optional property that specifies the name of the
installed file which is by default name of the module.
This will be used to APEXs to have ./etc/ld.config.txt files for their
own.
Test: m (prebuilt_etc_test.go added)
Change-Id: Ic8d0c0044c5bc2c6c33117fe2c19ef6ad75451a8
Privileged APKs need to store their dex files uncompressed so they
can be verified and mapped directly out of the APK.
Also track whether the module will be dexpreopted or not in order
to determine if the dex file should be stripped before signing.
Test: SystemUI.apk contains an uncompressed dex file
Change-Id: I4dca86c7f8778595882405b34adcf2a7bae03c67
Add soong build restrictions for libcore targets to stop
other targets depending on internals.
Test: cd build/soong/; ./build_test.bash --products aosp_arm
Bug: 113148576
Change-Id: I2c15924fbecaf0c2076d08de65814a6dcb790e73