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
The usecase here is system/core/liblog, which wants to turn off
sanitizer only for the target module, since the target sanitizers depend
on liblog.
Change-Id: I99141574a1c4c4847aa8a72bdcc88901fd9b01cd
Store product variables in pointers so that we can only apply the
properties if the product variable was set to a value. Also only apply
bool properties if they are true, adn rearrange the code to do the
cheapest checks first.
Remove device_uses_logd, it doesn't exist any more.
Change-Id: Icf42408f57bd611746f8d985bfceb50c7f95ea59
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
Instead of using this hardcoded list, use the blueprint plugin
infrastructure to find them at build time and load them.
Bug: 23567252
Change-Id: Iae87e8c9bf020f4beb42c418b9a6bf8b0fe8b601
Refactor the soong.config loading code to support reading in
product variables from soong.variables.
Change-Id: I389e6bb5c501b53167267d5f5d0d25557811cf72
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
ARCH_X86_HAVE_SSE* should not have second_arch set, they always
apply to x86 regardless of TARGET_ARCH vs. TARGET_2ND_ARCH.
Change-Id: I21fa4c88e9c966a7181f3b17c95c06080b678556
The source path was being appended to the module out directory
to create the file list file, which was resulting in .. in the
source path moving the file list file up the directory tree.
Use SrcDirRelPath to convert the globbed resource directories
to be relatiave to $srcDir before appending them.
Also do the same fix to generated aidl, logtags, yacc, and lex
files.
Change-Id: I2e636bd30abf03bc1d80a897951a9812cc3e09ef