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
Support specifying an install path relative to the default install
path for cc libraries and binaries.
Change-Id: I47a97de9beaedde27d99c498c3f26c9d36358d94
Add support for running aapt to generate R.java and Manifest.java,
compiling java into jar, adding resources to the jar to convert it
into an apk, signing the apk, and zipaligning the apk.
Change-Id: I7a73fef590d07f35b3d0b56a8571780c09bb10ae
Store the jar output file for the app build to use.
Allow module types built on top of javaBase to provide filelist files
containing source files.
Allow module types built on top of javaBase to insert dependencies through
JavaDynamicDependencies.
Allow any java module to depend on framework-res.apk.
Move the install rule from javaBase to JavaLibrary.
Change-Id: I46e7e80139845ef7cc89daf180bddbdf77125555
framework.jar needs to compile against R.java and Manifest.java from
framework-res.apk. Rather than complicating the Blueprints properties
with values that will only be used once, add one-off logic to
collectDeps to extract the rJarSpec out of the framework-res module.
Change-Id: I1195b1b5e07badc583703479382ceba35300b8fd
Java vs. Android resource directories are already confusing enough,
rename resource_dirs to java_resource_dirs to make room for
android_resource_dirs.
Change-Id: Iffd087860b98df29e81d8d2f823be87c8227e614