diff --git a/androidbp/cmd/androidbp.go b/androidbp/cmd/androidbp.go index 23c9c98e2..2dba6c10d 100644 --- a/androidbp/cmd/androidbp.go +++ b/androidbp/cmd/androidbp.go @@ -33,7 +33,7 @@ func valueToString(value bpparser.Value) string { if value.Expression.Operator != '+' { panic(fmt.Errorf("unexpected operator '%c'", value.Expression.Operator)) } - return fmt.Sprintf("%s %s", + return fmt.Sprintf("%s%s", valueToString(value.Expression.Args[0]), valueToString(value.Expression.Args[1])) } else { @@ -88,12 +88,7 @@ func processWildcards(s string) string { func listToMkString(list []bpparser.Value) string { lines := make([]string, 0, len(list)) for _, tok := range list { - if tok.Type == bpparser.String { - lines = append(lines, fmt.Sprintf(" %s", processWildcards(tok.StringValue))) - } else { - lines = append(lines, fmt.Sprintf("# ERROR: unsupported type %s in list", - tok.Type.String())) - } + lines = append(lines, fmt.Sprintf(" %s", valueToString(tok))) } return strings.Join(lines, " \\\n") diff --git a/androidbp/cmd/soong.go b/androidbp/cmd/soong.go index 2b7d32e4f..1f15aac7a 100644 --- a/androidbp/cmd/soong.go +++ b/androidbp/cmd/soong.go @@ -51,15 +51,15 @@ var standardProperties = map[string]struct { // ==== BOOL PROPERTIES ==== "host": {"LOCAL_IS_HOST_MODULE", bpparser.Bool}, "clang": {"LOCAL_CLANG", bpparser.Bool}, - "static": {"LOCAL_FORCE_STATIC_EXECUTABLE", bpparser.Bool}, + "static_executable": {"LOCAL_FORCE_STATIC_EXECUTABLE", bpparser.Bool}, "asan": {"LOCAL_ADDRESS_SANITIZER", bpparser.Bool}, "native_coverage": {"LOCAL_NATIVE_COVERAGE", bpparser.Bool}, "nocrt": {"LOCAL_NO_CRT", bpparser.Bool}, "allow_undefined_symbols": {"LOCAL_ALLOW_UNDEFINED_SYMBOLS", bpparser.Bool}, - "rtti": {"LOCAL_RTTI_FLAG", bpparser.Bool}, - "no_standard_libraries": {"LOCAL_NO_STANDARD_LIBRARIES", bpparser.Bool}, - "export_package_resources": {"LOCAL_EXPORT_PACKAGE_RESOURCES", bpparser.Bool}, - "static_executable": {"LOCAL_FORCE_STATIC_EXECUTABLE", bpparser.Bool}, + "rtti": {"LOCAL_RTTI_FLAG", bpparser.Bool}, + "no_standard_libraries": {"LOCAL_NO_STANDARD_LIBRARIES", bpparser.Bool}, + "export_package_resources": {"LOCAL_EXPORT_PACKAGE_RESOURCES", bpparser.Bool}, + "no_default_compiler_flags": {"LOCAL_NO_DEFAULT_COMPILER_FLAGS", bpparser.Bool}, } var rewriteProperties = map[string]struct {