- 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
Add genrule, which uses a host executable (possibly built by the
build system) to generate a single source file. This differs slightly
from gensrcs, which takes a list of sources and translates them through
a host executable to individual source files.
Change-Id: I94bda62c4c53fb3f3817def190e6a7561508d297
Delete package-export.apk before rebuilding to avoid aapt warnings
about using -f on existing packages.
Change-Id: I189486c4b3bd5fa46eff2e3b6a244d28329e7f02
Add libgtest to native test dependencies before adding stl
dependencies to resolve link errors between libgtest and
libc++_static.
Install device native tests to /dava/nativetest32 and
/data/nativetest64.
Change-Id: I6d9ddba8d5cdbacaa86cae0833fd7e656657e4d9
Allow combined static/shared libraries to specify separate dependencies,
and recompile objects if static or shared cflags are set.
Change-Id: I9fd71d8debd5ade5637389ee38e793082d6d18bb
Host gcc libraries should only apply to static binaries, not all
static libraries. Add c.staticBinary(), and rework everything
else to use c.static(), removing c.shared().
Change-Id: I8addae9b6848010cef94d873f48e7e358e4f5059
Pass --fix-cortex-a8 only on Cortex A8 and generic ARM builds, and
pass --no-fix-cortex-a8 on everything else.
Change-Id: I4b12afee4de443b5d55df66be3c6a05251715e31
Now that we use extractPrebuilts to extract compiled classes from
jars after jarjar, it needs to extract to a different directory
than used when compiling. Extract them to extracted/classes. Also
move the classes.list and resources.list file out of the classes
directory so they don't find themselves and end up in downstream
jars.
Change-Id: I070323466858edc7e33e14207c98f77d540882f3
Java resource lists created by globs like "**/*" may include
directories. Ignore them when creating the zip file unless
-d was passed on the command line. Fixes read: is a directory
errors.
Change-Id: Ifa6fd4fbd8262f700bed1f4a7268f11618dc305c
Combine the zipWriter and info arguments that are passed into every
function into a single writer class, and make all the functions
methods on the new class.
Change-Id: I29d0164578894974ceaed9482349604633de6533
Targeting the platform-provided libc++ on the host requires passing
-nodefautlibs to gcc, and then re-adding all the default libs except
libc++.
Change-Id: I5a42375bcc819b07f6ee02e9d76e7f5088fa00e0
Instead of the complicated Flags and DepNames system used now
for overriding CC modules, export all the main structs and the
properties structs so that module types that override them can
modify properties before build rule generation starts.
Change-Id: I6d71550def1ef07798b27d5fec40739ef3ac8165
Reduce the number of flags variables when compiling C by getting
rid of the separately-tracked IncludeDirs variables, and putting
them directly in GlobalFlags. Also changes exportedIncludeDirs
to exportedFlags, which will allow exporting flags besides -I.
Also fixes a bug when building a module with the NDK and -Werror
by passing NDK exported include directories with -isystem instead
of -I, which will ignore warnings from those includes.
Also fixes a bug where the default includes were being inserted
into all cflags by the arm and arm64 toolchain modules.
Change-Id: Ice97f84e637b21d20c38c85b881afa315f9f92ae
Modules built against the NDK shouldn't get the global or arch-specific
include paths, all headers will be provided by depenendencies or the
NDK.
Change-Id: I13b9530a365e11e9cf6bd2b99b756b36944e0a9e