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
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
soong.config is not cleared between builds, which can cause
problems when switching between an ndk build and a platform build.
Bug: 118398924
Test: OUT_DIR=out_ndk DIST_DIR=dist build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: Ifc03a0c25f46625375cdda5723e4a09d7d8050d5
Add a missing toolchain method, don't require modules to opt in to
linux_bionic.
Bug: 31559095
Test: attempt to build host bionic
Change-Id: Ia5c8e2f127b88f56191b7abc389d5329cfdb0720
When building with two OSes of the same class (Host, etc) enabled,
independently produce variants of each module for each OS, instead of
making `compile_multilib: "first"` select just one of the OSes.
My use case this is for Linux + LinuxBionic, which are both considered
Host class, but this would also applied if we wanted to generate rules
for Linux+Darwin, or some combination of firmware bits (either in
addition to Android in the Device Class, or multiple firmwares in a new
Class)
Bug: 31559095
Test: enable host bionic, see a linux(_glibc) and linux_bionic
definition for binaries
Change-Id: I55e7f046758b3dc2a31da2c4b20274ec68ece0a0
This should always be true now. It will be a change for side branches
(build_tools, etc) that weren't setting UseClangLld in the
soong.variables file.
Test: treehugger
Change-Id: I9fd6157fda630bf8bb939677dbcb026f02685f19
We're only using it to distribute files in case of failure, which isn't
well supported currently, but can be handled for now by using the
DIST_DIR environment variable during the command execution.
This was at least one cause that we'd be re-running Soong during every
build server build, as the DIST_DIR values are unique.
Test: m dist
Change-Id: Ibd5e6b6c46695350de80b745bfb6a6aa685033a0
There are a set of git projects that are part of or
closely related to "core libraries" and will need to
be allowed to compile against core library implementations
(and not stubs) after we've switched the default to use
stubs.
Bug: 113148576
Test: build
Change-Id: Id10b7dd83b173bdbfdb07b404d0e5f1ff621e543