Add _<OS> suffix support, remove USE_MINGW am: 31a6a69f9f
am: e8cca4eda9
* commit 'e8cca4eda9ebcdbe3e0bb0bed44e6c3d68931939':
Add _<OS> suffix support, remove USE_MINGW
Change-Id: Ide7692e1399f11af3dcfb5e965be31050ebf6ac5
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