Remove Srcdir() from BootstrapConfig.
It was always ".".
Test: Presubmits.
Change-Id: I5381002b3f2986122f1b335a88119cead0a86d75
diff --git a/android/paths.go b/android/paths.go
index 9c9914e..71caaab 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -622,7 +622,7 @@
// It intended for use in globs that only list files that exist, so it allows '$' in
// filenames.
func pathsForModuleSrcFromFullPath(ctx EarlyModulePathContext, paths []string, incDirs bool) Paths {
- prefix := filepath.Join(ctx.Config().srcDir, ctx.ModuleDir()) + "/"
+ prefix := ctx.ModuleDir() + "/"
if prefix == "./" {
prefix = ""
}
@@ -658,7 +658,7 @@
}
// Use Glob so that if the default doesn't exist, a dependency is added so that when it
// is created, we're run again.
- path := filepath.Join(ctx.Config().srcDir, ctx.ModuleDir(), def)
+ path := filepath.Join(ctx.ModuleDir(), def)
return Glob(ctx, path, nil)
}
@@ -986,7 +986,7 @@
// code that is embedding ninja variables in paths
func safePathForSource(ctx PathContext, pathComponents ...string) (SourcePath, error) {
p, err := validateSafePath(pathComponents...)
- ret := SourcePath{basePath{p, ""}, ctx.Config().srcDir}
+ ret := SourcePath{basePath{p, ""}, "."}
if err != nil {
return ret, err
}
@@ -1002,7 +1002,7 @@
// pathForSource creates a SourcePath from pathComponents, but does not check that it exists.
func pathForSource(ctx PathContext, pathComponents ...string) (SourcePath, error) {
p, err := validatePath(pathComponents...)
- ret := SourcePath{basePath{p, ""}, ctx.Config().srcDir}
+ ret := SourcePath{basePath{p, ""}, "."}
if err != nil {
return ret, err
}