From 645332d50167260d7fd327233427724cd692c107 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 25 Apr 2018 15:06:01 -0700 Subject: [PATCH 1/2] Document glob patterns Bug: 71906438 Test: none Change-Id: Ic18f2dc5d91b30ff2b5beb8047d98591ba70ee00 --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b3239e9aa..3549b0253 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ all Android.bp files. For a list of valid module types and their properties see [$OUT_DIR/soong/.bootstrap/docs/soong_build.html](https://go/Android.bp). +### Globs + +Properties that take a list of files can also take glob patterns. Glob +patterns can contain the normal Unix wildcard `*`, for example "*.java". Glob +patterns can also contain a single `**` wildcard as a path element, which will +match zero or more path elements. For example, `java/**/*.java` will match +`java/Main.java` and `java/com/android/Main.java`. + ### Variables An Android.bp file may contain top-level variable assignments: From d2343a331e872e68499179e5e12a5d7d8605a7b7 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 30 Apr 2018 14:50:01 -0700 Subject: [PATCH 2/2] Fix data race when ALLOW_MISSING_DEPENDENCIES=true Missing dependencies were modifying a slice owned by a dependency, which could cause a data race. Return a copy instead. Test: build with race detector enabled Bug: 70706626 Change-Id: I9f68c887bee94348f3e11284c0833d2e04d62599 --- cc/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/library.go b/cc/library.go index 4a7884b74..b31fee2d0 100644 --- a/cc/library.go +++ b/cc/library.go @@ -709,7 +709,7 @@ func (library *libraryDecorator) buildShared() bool { } func (library *libraryDecorator) getWholeStaticMissingDeps() []string { - return library.wholeStaticMissingDeps + return append([]string(nil), library.wholeStaticMissingDeps...) } func (library *libraryDecorator) objs() Objects {