Add _<OS> suffix support, remove USE_MINGW

USE_MINGW is no longer supported by Make

Change-Id: I399190ac9e92a2e633bf5438d8deb653beae1bb1
This commit is contained in:
Dan Willemsen 2016-06-03 10:33:59 -07:00
parent 42e20e6063
commit 31a6a69f9f
2 changed files with 28 additions and 3 deletions

View file

@ -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",
},

View file

@ -240,6 +240,31 @@ include $(BUILD_SHARED_LIBRARY)
cc_library_shared {
logtags: ["events.logtags"] + ["events2.logtags"],
}
`,
},
{
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"],
},
},
}
`,
},
}