diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 744fbf928..d26808b62 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 cfa624b0a..965da2bf5 100644 --- a/androidmk/cmd/androidmk/test.go +++ b/androidmk/cmd/androidmk/test.go @@ -240,6 +240,31 @@ include $(BUILD_SHARED_LIBRARY) cc_library_shared { logtags: ["events.logtags"] + ["events2.logtags"], } +`, + }, + { + desc: "_ 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"], + }, + }, +} `, }, }