Add _<OS> suffix support, remove USE_MINGW
USE_MINGW is no longer supported by Make Change-Id: I399190ac9e92a2e633bf5438d8deb653beae1bb1
This commit is contained in:
@@ -381,6 +381,9 @@ var propertyPrefixes = []struct{ mk, bp string }{
|
|||||||
{"32", "multilib.lib32"},
|
{"32", "multilib.lib32"},
|
||||||
// 64 must be after x86_64
|
// 64 must be after x86_64
|
||||||
{"64", "multilib.lib64"},
|
{"64", "multilib.lib64"},
|
||||||
|
{"darwin", "target.darwin"},
|
||||||
|
{"linux", "target.linux"},
|
||||||
|
{"windows", "target.windows"},
|
||||||
}
|
}
|
||||||
|
|
||||||
var conditionalTranslations = map[string]map[bool]string{
|
var conditionalTranslations = map[string]map[bool]string{
|
||||||
@@ -414,9 +417,6 @@ var conditionalTranslations = map[string]map[bool]string{
|
|||||||
"($(BUILD_OS), linux)": {
|
"($(BUILD_OS), linux)": {
|
||||||
true: "target.linux",
|
true: "target.linux",
|
||||||
false: "target.not_linux"},
|
false: "target.not_linux"},
|
||||||
"USE_MINGW": {
|
|
||||||
true: "target.windows",
|
|
||||||
false: "target.not_windows"},
|
|
||||||
"(,$(TARGET_BUILD_APPS))": {
|
"(,$(TARGET_BUILD_APPS))": {
|
||||||
false: "product_variables.unbundled_build",
|
false: "product_variables.unbundled_build",
|
||||||
},
|
},
|
||||||
|
@@ -240,6 +240,31 @@ include $(BUILD_SHARED_LIBRARY)
|
|||||||
cc_library_shared {
|
cc_library_shared {
|
||||||
logtags: ["events.logtags"] + ["events2.logtags"],
|
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"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user