From 0a544695e9324951f5c0aed3e23900b62c1d6523 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 24 Jun 2015 15:50:07 -0700 Subject: [PATCH] Support the 'host' conditional in androidbp Change-Id: I01eaa1ad2e05aaf8cbf00286d7272d0f45bb18aa --- androidbp/cmd/androidbp.go | 2 +- androidbp/cmd/soong.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/androidbp/cmd/androidbp.go b/androidbp/cmd/androidbp.go index 560ef84cf..a8f4580c3 100644 --- a/androidbp/cmd/androidbp.go +++ b/androidbp/cmd/androidbp.go @@ -271,7 +271,7 @@ func (w *androidMkWriter) parsePropsAndWriteModule(module *Module) { } else if "target" == prop.Name.Name { props := w.lookupMap(prop.Value) standardProps = append(standardProps, translateTargetConditionals(props, disabledBuilds, module.isHostRule)...) - } else if "host_supported" == prop.Name.Name { + } else if _, ok := ignoredProperties[prop.Name.Name]; ok { } else { standardProps = append(standardProps, fmt.Sprintf("# ERROR: Unsupported property %s", prop.Name.Name)) } diff --git a/androidbp/cmd/soong.go b/androidbp/cmd/soong.go index 1f15aac7a..8afda7769 100644 --- a/androidbp/cmd/soong.go +++ b/androidbp/cmd/soong.go @@ -71,6 +71,10 @@ var rewriteProperties = map[string]struct { "suffix": {"LOCAL_MODULE_STEM", prependLocalModule}, } +var ignoredProperties = map[string]bool{ + "host_supported": true, +} + var moduleTypeToRule = map[string]string{ "cc_library_shared": "BUILD_SHARED_LIBRARY", "cc_library_static": "BUILD_STATIC_LIBRARY", @@ -97,6 +101,7 @@ var suffixProperties = map[string]map[string]string{ } var hostScopedPropertyConditionals = map[string]string{ + "host": "", "darwin": "ifeq ($(HOST_OS), darwin)", "not_darwin": "ifneq ($(HOST_OS), darwin)", "windows": "ifeq ($(HOST_OS), windows)",