Fix globbing bugs
Fix two bugs in globbing: check for excludes before globs so that excludes that contain globs are not treated as includes, and remove the Generator attribute from globRule so that the rule reruns if the command line changes, for example if the glob or excludes list changes. Change-Id: I216c0c925eeb00a3814300548c005bcdf64a1f30
This commit is contained in:
parent
6f23ef6bf3
commit
6a114caa17
1 changed files with 7 additions and 6 deletions
|
@ -49,10 +49,9 @@ var (
|
|||
Command: fmt.Sprintf(`%s -o $out $excludes "$glob"`, globCmd),
|
||||
Description: "glob $glob",
|
||||
|
||||
Restat: true,
|
||||
Generator: true,
|
||||
Deps: blueprint.DepsGCC,
|
||||
Depfile: "$out.d",
|
||||
Restat: true,
|
||||
Deps: blueprint.DepsGCC,
|
||||
Depfile: "$out.d",
|
||||
},
|
||||
"glob", "excludes")
|
||||
)
|
||||
|
@ -81,9 +80,11 @@ func expandGlobs(ctx AndroidModuleContext, in []string) []string {
|
|||
|
||||
out := make([]string, 0, len(in))
|
||||
for _, s := range in {
|
||||
if glob.IsGlob(s) {
|
||||
if s[0] == '-' {
|
||||
continue
|
||||
} else if glob.IsGlob(s) {
|
||||
out = append(out, Glob(ctx, s, excludes)...)
|
||||
} else if s[0] != '-' {
|
||||
} else {
|
||||
out = append(out, s)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue