aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-06-03 10:33:59 -0700
committerDan Willemsen <dwillemsen@google.com>2016-06-03 12:57:05 -0700
commit31a6a69f9fc93905743cf119cb01699144c8de54 (patch)
tree8e1e57ff63a8bc26bfc290fd3220cd71f7ad2504 /androidmk
parent42e20e60633b11884a7de5c5da9bbd53befb7e86 (diff)
downloadbuild_soong-31a6a69f9fc93905743cf119cb01699144c8de54.tar.gz
build_soong-31a6a69f9fc93905743cf119cb01699144c8de54.tar.bz2
build_soong-31a6a69f9fc93905743cf119cb01699144c8de54.zip
Add _<OS> suffix support, remove USE_MINGW
USE_MINGW is no longer supported by Make Change-Id: I399190ac9e92a2e633bf5438d8deb653beae1bb1
Diffstat (limited to 'androidmk')
-rw-r--r--androidmk/cmd/androidmk/android.go6
-rw-r--r--androidmk/cmd/androidmk/test.go25
2 files changed, 28 insertions, 3 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 744fbf92..d26808b6 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -381,6 +381,9 @@ var propertyPrefixes = []struct{ mk, bp string }{
{"32", "multilib.lib32"},
// 64 must be after x86_64
{"64", "multilib.lib64"},
+ {"darwin", "target.darwin"},
+ {"linux", "target.linux"},
+ {"windows", "target.windows"},
}
var conditionalTranslations = map[string]map[bool]string{
@@ -414,9 +417,6 @@ var conditionalTranslations = map[string]map[bool]string{
"($(BUILD_OS), linux)": {
true: "target.linux",
false: "target.not_linux"},
- "USE_MINGW": {
- true: "target.windows",
- false: "target.not_windows"},
"(,$(TARGET_BUILD_APPS))": {
false: "product_variables.unbundled_build",
},
diff --git a/androidmk/cmd/androidmk/test.go b/androidmk/cmd/androidmk/test.go
index cfa624b0..965da2bf 100644
--- a/androidmk/cmd/androidmk/test.go
+++ b/androidmk/cmd/androidmk/test.go
@@ -242,6 +242,31 @@ cc_library_shared {
}
`,
},
+ {
+ desc: "_<OS> suffixes",
+ in: `
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES_darwin := darwin.c
+LOCAL_SRC_FILES_linux := linux.c
+LOCAL_SRC_FILES_windows := windows.c
+include $(BUILD_SHARED_LIBRARY)
+`,
+ expected: `
+cc_library_shared {
+ target: {
+ darwin: {
+ srcs: ["darwin.c"],
+ },
+ linux: {
+ srcs: ["linux.c"],
+ },
+ windows: {
+ srcs: ["windows.c"],
+ },
+ },
+}
+`,
+ },
}
func reformatBlueprint(input string) string {