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
diff --git a/androidbp/cmd/androidbp_test.go b/androidbp/cmd/androidbp_test.go
index 87170ed..cf5be7a 100644
--- a/androidbp/cmd/androidbp_test.go
+++ b/androidbp/cmd/androidbp_test.go
@@ -104,6 +104,33 @@
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