This defines another mutator between HostOrDevice and Arch that will
expand host modules into a module for each host type
(Darwin/Linux/Windows) that is currently being built.
Change-Id: I4c8ac6b616c229f6bd45ad8a35902652fb6a4fff
Use blueprint's new anonymous embedded struct feature to move the arch
variant properties down a level, replacing arch.cortex_a9.srcs with
arch.arm.cortex_a9.srcs, while still supporting top-level properties
like arch.arm.srcs.
Change-Id: I14820b75b31586ef1e16a4812dcb1f5fdf1ff941
Allow architecture toolchains to register "features" supported by the
current variant, and then apply properties from the selected features.
Equivalent to the ARCH_*_HAS_* variables in the combo makefiles.
Change-Id: Ib6823be1c1a52da677d081db9f24336a072eaf39
Post-process the arch and cpu variants to treat the arch name or
"generic" as an empty variant. Filter out extra empty abis. Ignore
empty arches. Print a useful error message when appending properties
fails to find the target field, when an unknown architecture is used, or
when a toolchain has not been implemented for the selected
architecture.
Change-Id: I671d4cd04975f4f29aefc4267b3a624868ce6a75
Add a cc_defaults module, which will prepend any matching properties to
modules that reference it with a "defaults" property.
Change-Id: I5908dd98d204f71b29ad95a4ab85403aa1621ca2
EarlyMutators are identical to BottomUpMutators, except they run before
DynamicDependencies. DynamicDependencies can be replaced with a
BottomUpMutator. Replace both EarlyMutators and DynamicDependencies
with BottomUpMutators, which allows setting the order between all
mutators through registration order.
Change-Id: Id1305d798d3d2da592061c89d7c10a71780b71a3
Blueprint has a generic AppendProperties/AppendMatchingProperties now,
use it, and replace all bool properties that might be modified by a
mutator with *bool, which provides the correct replace-if-set semantics
for append.
Also remove uses of ContainsProperty except when explicitly checking if
a property was set in a blueprints file.
Change-Id: If523af61d6b4630e79504d7fc2840f36e98571cc
Renames cortex_a53 to cortex_a53_64, since we need to set options for
both. Also adds the cortex_a53_a57 big/little configuration.
Change-Id: Ia0e8104867f9aed7cbf5be8be1ead6ddc30c42c4
Allow modules to vary their properties based on product variables.
For now, DEVICE_USES_LOGD, DEVICE_USES_JEMALLOC, and DEVICE_USES_DLMALLOC,
and BOARD_MALLOC_ALIGNMENT are supported.
Product variables can provide a value (only bool and int supported for
now), and if any of the product variable properties contains a "%d"
then Sprintf will be called with the property value as the format
and the product variable value convert to an int as the only argument.
For example:
product_variables: {
dlmalloc_alignment: {
cflags: ["-DMALLOC_ALIGNMENT=%d"],
},
},
will cause -DMALLOC_ALIGNMENT=16 to be added to any top level
properties called "cflags".
Change-Id: I74882a6ab4914d3e222f8d06cfac371b7b829ae5
Instead of putting all the blueprint registrations in soong_build,
put them all in init() functions. This puts the registration next
to the implementation.
Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
Add nested properties that can vary based on the specific cpu type,
for example cortex-a9 or cortex-a15.
Change-Id: I107d6e30527c11d0bdd9bf17fb29513ffb07f9cc
To align with the current make build system, add exclude_srcs and
exclude_java_resource_dirs. These replace the functionality of
arch_subtract and glob exclusions that use "-file" to exclude a file.
Change-Id: I91c23d5e3c9409f2d9f7921f950153a03a68ad61
Improve the comments associated with properties to work better with
Blueprint's auto-documenting feature.
Make all properties structs into named types so that thet types can be
found using reflection and cross-referenced to the source code to
auto-extract docs.
Remove the leading <property>: text from properties, the documentation
will include the lowercased name of the property.
Add filter tags to the nested arch properties.
Change-Id: I4ef5db86358886fe61456c24eb2dbe6f7b876115
CloneEmptyProperties is much faster than CloneProperties followed
by ZeroProperties. Cuts >100ms off soong_build runtime, which will
become more important when we start calling soong_build a second
time to automatically generate documentation.
Change-Id: I45d948b36d9937a21b13dab068c3ce9a60b5a59b
Take HostOrDevice out of Arch, and put it into AndroidModuleBase
instead. Also separate out the host vs. device mutator from
ArchMutator. This will make it possible for genrules to depend
on a host tool, regardless of which host arches it is compiled
for.
Change-Id: I22bbfd28b65c3eebdfa101a712f90dd615148dc8
At least libcutils and boringssl need to set source files that
apply to x86 or x86_64, but only on the host or on the device.
Add new properties that can contain arch variant properties:
target.android_arm
target.android_arm64
target.android_mips
target.android_mips64
target.android_x86
target.android_x86_64
target.linux_x86
target.linux_x86_64
target.darwin_x86
target.darwin_x86_64
Change-Id: I5a7076653a7367a63daa7f7e34a6a28f5cbdfbe7
Add support for compiling java libraries (.jar files with
or without .dex), java binaries (.jar files with a wrapper
script to run them), and java prebuilts (for the SDK .jars)
Change-Id: Id624da64c92cf20c6d9577c6bb06e5b212af0d1b
Instead of setting a string property to magic default value and then
checking for it later, call ctx.ContainsProperty to determine if it
was set. Use the same method on the clang bool property, which
couldn't be set to a magic value.
blueprint's ModuleContext.ContainsProperty only works on a single
property, not on all arch variant properties -
ModuleContext.ContainsProperty("clang") will return false if
clang was not set but arch.arm.clang was set - so track which
properties were extended inside extendProperties, and override
ModuleContext.ContainsProperty in AndroidModuleContext to also
check the extended properties.
Change-Id: I03cbe71dc69344972e23d6c794da9be05e720c45
The linker and a few other executables and libraries need to know
if they are a 32-bit process running on a 64-bit host. Add
android64 and android32 target types to set custom cflags.
Change-Id: I142378e2d5be17a87ff761257dacc1734b093048
Add Host(), Device(), and Debug() to AndroidModuleContext to allow
build rule generators to easily determine build options.
Change-Id: Ib93a462cb45189399063f641b3a8df175db0592e
Refactor common code out of NewCC* to initialize the ccBase,
ccDynamic, and ccLibrary structures. Also adds an enum for the
default multilib values.
Change-Id: Iaeffe86bf2568b6054be4ddcee725818af45e14f
Initial build logic for building android with soong. It can build
a variety of C and C++ files for arm/arm64 and host.
Change-Id: I10eb37c2c2a50be6af1bb5fd568c0962b9476bf0