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
* commit 'ff93bddda3268edc4159aa2eea9d8d814727732f': (173 commits)
Fix glob filename overlap
Fix arm cflags
Add support for x86_sse3 and x86_sse4 arch sections
use init functions to register module types, etc.
Use same libgcc as Make for arm
Fix libgcc/libatomic link order
Enable host multilib
Add cpu-variant properties
Refactor standard and rewrite properties to reduce duplication
Add version_script property
androidbp: Optimize cc_library builds, share static lib
androidbp: Implement static/shared property copying
Add exclude_* and remove arch_subtract / "-file"
Use += for both assignments to LOCAL_C_INCLUDES
androidbp: simplify translation by evaluating all expressions in Blueprint
Ignore some module types during translation
Allow manually specifying translations for modules
androidbp: make error handling stricter
Remove comments from translated Android.mk files
Support the 'host' conditional in androidbp
...
If resources and java files were compiled from the same directory,
ctx.Glob could try to create a glob file that had the same name
as the directory containing another glob file. Namespace each
call to ctx.Glob so they never conflict.
Change-Id: I4db73af568a2ff2e708e9db64798073b1ed2ff61
-mthumb-interwork was missing from the beginning.
The Clang cflags copy was only a shallow copy, so our clang-specific
fixups were affecting the GCC cflags as well.
The cortex-a15 replacement was removed from build/core with this change:
https://android-review.googlesource.com/#/c/143851
Change-Id: Ib6300e064f6ec4f6a7174d5e2aeacad1c359f7ea
Instead of putting all the blueprint registrations in soong_build,
put them all in init() functions. This puts the registration next
to the implementation.
Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
Add nested properties that can vary based on the specific cpu type,
for example cortex-a9 or cortex-a15.
Change-Id: I107d6e30527c11d0bdd9bf17fb29513ffb07f9cc
Refactor calls to standardProperties and rewriteProperties into
translateSingleProperty that can be used for normal, suffix, and
target properties.
Change-Id: I04e060588d4feeba1da7802d68622fe9b20e2c8b
If the cflags are identical, and there aren't extra sources in the
static version of a cc_library, then we can re-use the static library in
the build of the shared library.
Change-Id: I54c59aa3edcc47bc777132461b8e6a84cef0587e
During mutation, make deep copies of the blueprint modules, then start
modifying the property lists to apply the static/shared properties.
Change-Id: Idc7063f4d1cf7d173ae10418e3437f3e2b914f59
To align with the current make build system, add exclude_srcs and
exclude_java_resource_dirs. These replace the functionality of
arch_subtract and glob exclusions that use "-file" to exclude a file.
Change-Id: I91c23d5e3c9409f2d9f7921f950153a03a68ad61
include_dirs and local_include_dirs properties both translate to
LOCAL_C_INCLUDES. Use += for both assignments so they don't
clobber eachother.
Change-Id: Ie9e5e28ecd5a7ca76ab2a981e7d50d2c9b93ad92
Translation is getting complicated because the expressions supported
by Blueprint are difficult to support in Make. Modify androidbp
to use context aware parsing so it can evaluate all expressions at
parse time, so it only needs to deal with constant values.
Change-Id: I57047645fb48475baecd0361f78a93ec0a26011e
bootstrap_go_binary and bootstrap_go_package modules are part
of Blueprint and don't need to be translated.
toolchain_library modules are used by Soong to wrap gcc-provided
libraries are don't need to be translated.
Change-Id: I1602849060b6c85a43fc1ffb8e98c752d9d1512b
Parse the comment block above each module or assignment looking
for directives in the form:
Android.mk:<directive>
If a block delimited by start and end directives is found, use it
as the Android.mk translation instead of trying to automatically
translate. If an ignore directive is found, ignore the module
completely.
Change-Id: I34fe392899ed27ce3f640a2a71fbbaaedea67169