Don't insert a space when concatentating strings. Lists will already have
a separator, and strings may need to be a single word.
Use valueToString to print individual elements in a list to pick up the
same expression fix from a previous patch.
"static_executable" converts to LOCAL_FORCE_STATIC_EXECUTABLE, not "static".
Add "no_default_compiler_flags" to LOCAL_NO_DEFAULT_COMPILER_FLAGS.
Change-Id: I45c7eb8355ee1b40d7949e1560cc11cc959764b3
In make, conditionals are required to have a space in between the text
and the opening parenthesis.
Change-Id: I7e60e36982ec1d99acc66d0ffb4cff507e6a040d
Add a conversion for static_executable -> LOCAL_FORCE_STATIC_EXECUTABLE
In androidmk, LOCAL_MODULE_STEM values are converted to 'suffix' values
if it is in the form $(LOCAL_MODULE)<suffix>. Do the opposite in
androidbp.
Change-Id: Ia645cf21c0def3d055188ab5b021344bb50aa58e
Support + operators in Android.bp files
Remove trailing \n from list values in case they are part of an
expression
Replace manual $(LOCAL_PATH) prefixing in prependLocalPath with
a call to $(addprefix $(LOCAL_PATH),...) so it works on expressions.
Change-Id: I68a62b64381b7616fb7dc27fb064b1ffd3b4542a
We're hardcoding LOCAL_PATH instead of using the my-dir macro.
LOCAL_MODULE_MAKEFILE is the other variable set up by this macro, used
to ensure that changes to the makefile rebuilds the objects defined in
the makefile.
Change-Id: I994b72ab9053d5a057eb3e35a8710038800432eb
So that we generate the Android.mk file if it is removed. Adding
Android.mk files is already handled by the implicit dependencies in
common.Glob
Change-Id: I568e24b7bc44ecadbbe01c1f7c6a97afd819c7db
Properties need to be parsed twice to support different conditionals for
target and host modules. Then add 'android' target support that will
just be selected for target modules.
Change-Id: I8970d5a0d132324ac7e2a7fffc2b07e7c0da33c0
This finds any Android.bp files with Android modules defined, and if
there isn't an Android.mk file in the same directory, it will run
androidbp to generate one in $OUT
Change-Id: Ie8aef492e8cd28f6c314ce1254730975a1b8991f
Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either. Also
move ExpandSources and Glob into AndroidModuleContext.
Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
Build a map of blueprint directory to modules built from that
directory, and then add phony rules to build.ninja that emulate
the behavior of mma in the current build system.
Also fixes checkbuild to depend on checkbuild files and installable
files, but not installed files.
Change-Id: I8bad6e93387940df7439dbd4554f6d79f924c65f
This will defer printing the local path until the first module or
definition. Usually, there's a copyright comment at the top of the file
that will be now be printed first, then the LOCAL_PATH.
Change-Id: I349f7e30eaa99dcfdc73e96248774927a13be8cb
- Allow to specify the output Android.mk file path.
We need this to generate Android.mk into the out diretory.
- Makefile strings don't need quotes.
- Return non-zero exit code if it fails.
- Other trivial format changes.
Change-Id: I460083f6e0a2707cd4a6fe0bef3f8ae7562e9edb
Rename module definition files to Android.bp to avoid conflicts
with another project called Blueprint.
Change-Id: I105a07555eb7890f56120deab9036cf9ae5d8525
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
ccCmd was being added as a dependency each time through the object
file loop, tripling the size of the build.ninja file. Create a
new slice for dependencies on each object file.
Change-Id: Id768d8ea6e5300c15f0f1a5fac5fcbdfdf5e6b0a
A far dependency will not inherit any of the variations from the current
module, allowing a device genrule to depend on a host tool to generate
the sources.
Change-Id: I7f622ddd31a81d605f55d5946a109ea53e864084
Allow variables to have a prefix, for example "target.arm.cflags".
Each prefixed name separated by a "." will become a nested map
property.
Change-Id: Ib982b8dcaf2f1dc919acb2767e769950916c50f7
Sort LOCAL_INCLUDE_DIRS values into local_include_dir include_dirs based
on whether they are prefixed with $(LOCAL_PATH)/, and strip $(LOCAL_PATH)/
from export_include_dirs.
Change-Id: I20f9f0f8385088660855c7ccf85b7933ff2dcd44
Require directories listed in the include_dirs, local_include_dirs, and
exported_include_dirs properties to exist.
Change-Id: I5b079bd2c607839bb28dae43801cd7345bde2299
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
Various build rule changes to match AOSP:
Add libunwind_llvm and libdl as dependencies for libc++ on device
Always add libcompiler_rt-extras as a dependency
Add libm, libc, and libdl as depnendencies for libc++ static binaries
Disable some clang warnings, and add some clang filtered cflags
Add -fstack-protector to host linux builds
Add jack_flags property to java modules (currently ignored)
Change-Id: Ic0da617bdeaf25f58cb8298dd9ea91b7d6509151
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
Handle java resource globbing in two passes, the first on the
list of resource dirs to produce a list of directories, and the
second to glob for files inside those directories using **/*.
Fixes incorrect jarSpec dir errors when the resource directories
list contains globs.
Change-Id: Icea5d8178336eb7de4ad91a9acba4822423d9f60
Fix two bugs in globbing: check for excludes before globs so that
excludes that contain globs are not treated as includes, and
remove the Generator attribute from globRule so that the rule
reruns if the command line changes, for example if the glob or
excludes list changes.
Change-Id: I216c0c925eeb00a3814300548c005bcdf64a1f30
pathtools.GlobWithExcludes contains all the features of
glob.GlobWithDepFile now, make GlobWithDepFile a wrapper
around GlobWithExcludes that writes the results to a file.
Change-Id: Ie75d9042845505f499aac7fa00d3c90f8ecab4f7
Make static or shared cflags properties apply to all source files,
not just the source files defined in the static or shared block.
Needed for libunwind, which passes -DUNW_ADDITIONAL_PREFIX to source
files for the static library, but not for the shared library.
Change-Id: I3cd88cc1099e505eeee077c697db00de22a8b03a