aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-02-26 21:50:08 -0800
committerDan Willemsen <dwillemsen@google.com>2018-03-01 14:05:20 -0800
commit540a78c1ce0519b8085a5f5388474b0a3a4350b1 (patch)
tree1a93fb7a4a5a75c9758c085f723f598479ac13d7 /cc
parentf6366cc0a1ffdb894c886ebacf10d65f06a6226c (diff)
downloadbuild_soong-540a78c1ce0519b8085a5f5388474b0a3a4350b1.tar.gz
build_soong-540a78c1ce0519b8085a5f5388474b0a3a4350b1.tar.bz2
build_soong-540a78c1ce0519b8085a5f5388474b0a3a4350b1.zip
Turn GlobFiles into a Glob for files, use it
GlobFiles had allowed results to be anywhere in the source tree, restrict it to results within the current module directory. Then use it for ExpandSources and other places where we only want files. This fixes using '*' in cc_test's `data` property, which can only support files. The only thing this changes today is that java_resource_dirs and java_resources no longer pass directories to soong_zip's -f argument. core-libart previously added some icu directories, now it only passes files. Bug: 71906438 Test: only expected changes in out/soong/build.ninja Test: add data: ["**/*"] to a cc_test, build successfully Change-Id: Iff1bd8c005a48e431c740706d7e23f4f957d8b1d
Diffstat (limited to 'cc')
-rw-r--r--cc/llndk_library.go2
-rw-r--r--cc/ndk_headers.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index e824d0f6..b573c2e6 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -100,7 +100,7 @@ func (stub *llndkStubDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flag
func (stub *llndkStubDecorator) processHeaders(ctx ModuleContext, srcHeaderDir string, outDir android.ModuleGenPath) android.Path {
srcDir := android.PathForModuleSrc(ctx, srcHeaderDir)
- srcFiles := ctx.Glob(filepath.Join(srcDir.String(), "**/*.h"), nil)
+ srcFiles := ctx.GlobFiles(filepath.Join(srcDir.String(), "**/*.h"), nil)
var installPaths []android.WritablePath
for _, header := range srcFiles {
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index d7c2a061..9fabc97c 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -202,7 +202,7 @@ func (m *preprocessedHeaderModule) GenerateAndroidBuildActions(ctx android.Modul
fromSrcPath := android.PathForModuleSrc(ctx, String(m.properties.From))
toOutputPath := getCurrentIncludePath(ctx).Join(ctx, String(m.properties.To))
- srcFiles := ctx.Glob(filepath.Join(fromSrcPath.String(), "**/*.h"), nil)
+ srcFiles := ctx.GlobFiles(filepath.Join(fromSrcPath.String(), "**/*.h"), nil)
var installPaths []android.WritablePath
for _, header := range srcFiles {
installDir := getHeaderInstallDir(ctx, header, String(m.properties.From), String(m.properties.To))