Commit graph

9 commits

Author SHA1 Message Date
Dan Willemsen
2617316f6c androidbp: Optimize cc_library builds, share static lib
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
2015-07-06 14:32:51 -07:00
Dan Willemsen
2701212d05 androidbp: Implement static/shared property copying
During mutation, make deep copies of the blueprint modules, then start
modifying the property lists to apply the static/shared properties.

Change-Id: Idc7063f4d1cf7d173ae10418e3437f3e2b914f59
2015-07-06 13:52:26 -07:00
Colin Cross
b3245e9cf6 androidbp: simplify translation by evaluating all expressions in Blueprint
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
2015-06-30 17:51:25 -07:00
Colin Cross
b1a66c0cf7 Allow manually specifying translations for modules
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
2015-06-30 12:35:44 -07:00
Colin Cross
b093124675 androidbp: make error handling stricter
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
2015-06-30 12:32:03 -07:00
Dan Willemsen
3a4045d3b1 androidbp: Refactor Target/Device duplication to mutation
This is just another mutation in soong, implement it as a mutation in
androidbp as well.

Change-Id: Id72cba58db8603cace9d8ae5d8fbbd08167867cd
2015-06-29 22:06:55 +00:00
Dan Willemsen
49f50454c1 Support 'cc_library' in androidbp
Change-Id: I0a0ee48aac786a422e68e14ba14fc6186296214d
2015-06-29 22:03:26 +00:00
Dan Willemsen
ead184adaf androidbp: Add module tests
Change-Id: I563c901c8c65496f4de13d4dea38d2e7ee629fff
2015-06-29 21:47:59 +00:00
Dan Willemsen
f33877b0e9 androidbp: Test valueToString
Change-Id: I358cf4bb020fc4db14792e2cdffc18bc2f89f4d4
2015-06-29 21:46:22 +00:00