Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Also remove the host bin directory from the genrule path, and the
$srcDir variable, using either of them would have caused dependency
issues.
Bug: 31948427
Test: compare build.ninja
Change-Id: Icf6d3bce2bea00fec1363fd65c0bdf96d09281bf
(cherry picked from commit de6bd86d24
)
This commit is contained in:
@@ -59,9 +59,7 @@ func getMapping(s string, mapping func(string) (string, error)) (string, int, er
|
||||
case '$':
|
||||
return s[0:1], 1, nil
|
||||
default:
|
||||
i := strings.IndexFunc(s, func(c rune) bool {
|
||||
return !(unicode.IsLetter(c) || unicode.IsNumber(c) || c == '_' || c == '.' || c == '-')
|
||||
})
|
||||
i := strings.IndexFunc(s, unicode.IsSpace)
|
||||
if i == 0 {
|
||||
return "", 0, fmt.Errorf("unexpected character '%c' after '$'", s[0])
|
||||
} else if i == -1 {
|
||||
|
Reference in New Issue
Block a user