Add a new feature to cc modules that adds the cflags and libraries
necessary to implement AddressSanitizer, ThreadSanitizer, and
UndefinedBehaviorSanitizer.
Change-Id: Ibe5ffadc7ece56080a2521f2c7c00da9ef712584
There are stripped down branches used to build other things than just
unbundled apps (like the AOSP llvm branch used to build llvm prebuilts).
Change-Id: Id772eac8c4622458591b52f9f27723fdb83f9a85
Make was depending on the installed path for ckati/makeparallel, since I
didn't want to hardcode intermediate paths.
For modules in USE_SOONG, we export the intermediate paths, so we don't
need to install.
Change-Id: I90bf3ad1461e239a8a40fd0c8ddbc679cf00d126
This lets you configure soong to build for every supported architecture
in one build. Installation is disabled, since it's not actually setting
up multiple devices, and would try to install multiple versions to a
single path.
Configurations that do not build are commented out.
Change-Id: I92ddea0b9ddbd53e12187c7f581b8ac5bd5fdec3
Unbundled builds may use a subset of the tree, which can bring in unused
modules but not their dependencies. Delay handling of dependency errors
for unbundled builds to ninja time, which will prevent errors if only
modules with satisified dependencies are built.
Change-Id: Ib93bae93fcfa0b55df500a30d8e35231ffb0987c
The change to enable embedding in make change the default behavior to
produce an Android.mk file, change the ninja builddir, and add the
-soong suffix to the end of target names. These don't make sense if
we're not building inside make, so detect if we're running under make
by checking for a .soong.in_make file in the builddir.
Change-Id: I1a0f4c1becb327c769b8a130cafef11d83eb49f4
This centralizes verification and common operations, like converting the
path to a source file to the path for a built object.
It also embeds the configuration knowledge into the path, so that we can
remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that
leads to paths like './path' instead of just 'path' like make is doing,
causing differences in compiled binaries.
Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
If soong.variables didn't exist, loadFromConfigFile would write default
values to soong.variables, but return with the product variables set to
the zero values. Replace jsonConfigurable.DefaultConfig() with
SetDefaultConfig() that modifies the current object, and call it before
writing the values.
Change-Id: I7b7404c7a51975dc4493e25c775b3cf56ef335e3
The existing behavior of using the build directory as the working
directory is useful if you want to move/copy the output directory around
and SRCDIR still refers the the source. But, it's more useful to have
the source directory be the working directory. Tools like cpp(__FILE__)
and other debug prints embed relative paths from the working directory.
We also have tools that expect the working directory to be $TOP.
Change-Id: Ia0f1d3c6b7df72d61cf5628efa2baa98bd19775b
Any reads after the deps are saved won't show up as dependencies later.
So panic if new environment variables are read after saving deps.
Change-Id: Ia51deaf750804d3b99e69c001939a104c2d8c9f2
Refactor the soong.config loading code to support reading in
product variables from soong.variables.
Change-Id: I389e6bb5c501b53167267d5f5d0d25557811cf72
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
The envDeps map may be accessed concurrently by multiple modules
in GenerateBuildActions, wrap the accesses in a mutex.
Change-Id: I18abf2687997c045a99b987908623f7d8c2ea344
Replace the Config interface with a struct that wraps the real
*config object. This keeps the existing pointer behavior without
having to list all of the available config functions in the interface.
Change-Id: If55a622b5a112ca5dc7193ebd59f2931b3a8e6cd
Using ctx.Config().(Config) everywhere is a mouthful, and it is
inefficient to do the type assertion. Put the Config interface into
the context, and provide an AConfig() to return the Config already
converted to the right type.
Change-Id: I301a1fd7d2a005580aabca7866a37c5d42ad8c69