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
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
The glob depFile is not a listed output file of a rule, so it will
never be deleted by the cleanup phase. Remove the unnecessary phony
rule to avoid a warning when running soong -d explain:
ninja explain: output .intermediates/androidmk/glob/build/soong/Androidmk.d of phony edge with no inputs doesn't exist
Change-Id: I40ed5a28fb29b8455981f6debf1de2ea21c911ea
Improve the comments associated with properties to work better with
Blueprint's auto-documenting feature.
Make all properties structs into named types so that thet types can be
found using reflection and cross-referenced to the source code to
auto-extract docs.
Remove the leading <property>: text from properties, the documentation
will include the lowercased name of the property.
Add filter tags to the nested arch properties.
Change-Id: I4ef5db86358886fe61456c24eb2dbe6f7b876115
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
In make, conditionals are required to have a space in between the text
and the opening parenthesis.
Change-Id: I7e60e36982ec1d99acc66d0ffb4cff507e6a040d
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
So that we generate the Android.mk file if it is removed. Adding
Android.mk files is already handled by the implicit dependencies in
common.Glob
Change-Id: I568e24b7bc44ecadbbe01c1f7c6a97afd819c7db
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 finds any Android.bp files with Android modules defined, and if
there isn't an Android.mk file in the same directory, it will run
androidbp to generate one in $OUT
Change-Id: Ie8aef492e8cd28f6c314ce1254730975a1b8991f
Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either. Also
move ExpandSources and Glob into AndroidModuleContext.
Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
Build a map of blueprint directory to modules built from that
directory, and then add phony rules to build.ninja that emulate
the behavior of mma in the current build system.
Also fixes checkbuild to depend on checkbuild files and installable
files, but not installed files.
Change-Id: I8bad6e93387940df7439dbd4554f6d79f924c65f
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
Rename module definition files to Android.bp to avoid conflicts
with another project called Blueprint.
Change-Id: I105a07555eb7890f56120deab9036cf9ae5d8525
CloneEmptyProperties is much faster than CloneProperties followed
by ZeroProperties. Cuts >100ms off soong_build runtime, which will
become more important when we start calling soong_build a second
time to automatically generate documentation.
Change-Id: I45d948b36d9937a21b13dab068c3ce9a60b5a59b
ccCmd was being added as a dependency each time through the object
file loop, tripling the size of the build.ninja file. Create a
new slice for dependencies on each object file.
Change-Id: Id768d8ea6e5300c15f0f1a5fac5fcbdfdf5e6b0a
A far dependency will not inherit any of the variations from the current
module, allowing a device genrule to depend on a host tool to generate
the sources.
Change-Id: I7f622ddd31a81d605f55d5946a109ea53e864084