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
This commit is contained in:
Dan Willemsen
2015-06-26 17:40:54 -07:00
parent 2ef08f4458
commit 2701212d05
5 changed files with 202 additions and 48 deletions

View File

@@ -104,6 +104,33 @@ var moduleTestCases = []struct {
LOCAL_MODULE := test
include $(BUILD_HOST_STATIC_LIBRARY)`,
},
// Static and Shared properties
{
blueprint: `cc_library {
name: "test",
srcs: ["a"],
static: { srcs: ["c"], static_libs: ["l"], },
shared: { srcs: ["b"], },
multilib: { lib32: { shared: { cflags: ["f"], }, }, },
}`,
androidmk: `include $(CLEAR_VARS)
LOCAL_MODULE := test
LOCAL_SRC_FILES := \
a \
b
LOCAL_CFLAGS_32 := \
f
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := test
LOCAL_SRC_FILES := \
a \
c
LOCAL_STATIC_LIBRARIES := \
l
include $(BUILD_STATIC_LIBRARY)`,
},
// Manual translation
{
blueprint: `/* Android.mk:start