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
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
Instead of putting errors into the translated Android.mk file where
they are unlikely to be seen and may cause strange build behavior,
make all errors fatal. Also buffer to a byte buffer and then write
to the output file once we are sure there are no errors.
Change-Id: I247f405dd0a7c1d14c2681f86c7ac626e035ac2c
A bad recommendation from me lead to structuring the androidbp code
in a way that can't handle comments interspersed with module
definitions. Since the translated Android.mk files don't really
need to be human readable, just strip all the comments.
Change-Id: I23e3f1860730bcb43b5e00a305267aa426ed80aa
Don't insert a space when concatentating strings. Lists will already have
a separator, and strings may need to be a single word.
Use valueToString to print individual elements in a list to pick up the
same expression fix from a previous patch.
"static_executable" converts to LOCAL_FORCE_STATIC_EXECUTABLE, not "static".
Add "no_default_compiler_flags" to LOCAL_NO_DEFAULT_COMPILER_FLAGS.
Change-Id: I45c7eb8355ee1b40d7949e1560cc11cc959764b3
Add a conversion for static_executable -> LOCAL_FORCE_STATIC_EXECUTABLE
In androidmk, LOCAL_MODULE_STEM values are converted to 'suffix' values
if it is in the form $(LOCAL_MODULE)<suffix>. Do the opposite in
androidbp.
Change-Id: Ia645cf21c0def3d055188ab5b021344bb50aa58e
Support + operators in Android.bp files
Remove trailing \n from list values in case they are part of an
expression
Replace manual $(LOCAL_PATH) prefixing in prependLocalPath with
a call to $(addprefix $(LOCAL_PATH),...) so it works on expressions.
Change-Id: I68a62b64381b7616fb7dc27fb064b1ffd3b4542a
We're hardcoding LOCAL_PATH instead of using the my-dir macro.
LOCAL_MODULE_MAKEFILE is the other variable set up by this macro, used
to ensure that changes to the makefile rebuilds the objects defined in
the makefile.
Change-Id: I994b72ab9053d5a057eb3e35a8710038800432eb
Properties need to be parsed twice to support different conditionals for
target and host modules. Then add 'android' target support that will
just be selected for target modules.
Change-Id: I8970d5a0d132324ac7e2a7fffc2b07e7c0da33c0
This will defer printing the local path until the first module or
definition. Usually, there's a copyright comment at the top of the file
that will be now be printed first, then the LOCAL_PATH.
Change-Id: I349f7e30eaa99dcfdc73e96248774927a13be8cb
- 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