Add _<OS> suffix support, remove USE_MINGW
am: 31a6a69f9f
* commit '31a6a69f9fc93905743cf119cb01699144c8de54':
Add _<OS> suffix support, remove USE_MINGW
Change-Id: I2d6db24a401ec668c91443b9318be5677cb35fce
This commit is contained in:
commit
e8cca4eda9
2 changed files with 28 additions and 3 deletions
|
@ -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",
|
||||
},
|
||||
|
|
|
@ -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"],
|
||||
},
|
||||
},
|
||||
}
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue