Remove Srcdir() from BootstrapConfig. am: 6ec924c12b am: ee289293ea

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796651

Change-Id: I971741209908aaef5695756d8804eab63c5bbba9
This commit is contained in:
Lukacs T. Berki 2021-08-17 15:27:33 +00:00 committed by Automerger Merge Worker
commit 9c5c2d53e4
2 changed files with 2 additions and 6 deletions

View file

@ -39,7 +39,7 @@ var (
// These variables are the only configuration needed by the bootstrap
// modules.
srcDirVariable = bootstrapVariable("srcDir", func(c BootstrapConfig) string {
return c.SrcDir()
return "."
})
buildDirVariable = bootstrapVariable("buildDir", func(c BootstrapConfig) string {
return c.BuildDir()
@ -76,9 +76,6 @@ var (
)
type BootstrapConfig interface {
// The top-level directory of the source tree
SrcDir() string
// The directory where files emitted during bootstrapping are located.
// Usually NinjaBuildDir() + "/soong".
BuildDir() string

View file

@ -2,7 +2,6 @@ package bootstrap
import (
"fmt"
"path/filepath"
"reflect"
"github.com/google/blueprint"
@ -42,7 +41,7 @@ func ModuleTypeDocs(ctx *blueprint.Context, config interface{}, factories map[st
switch m := module.(type) {
case (*goPackage):
pkgFiles[m.properties.PkgPath] = pathtools.PrefixPaths(m.properties.Srcs,
filepath.Join(config.(BootstrapConfig).SrcDir(), ctx.ModuleDir(m)))
ctx.ModuleDir(m))
default:
panic(fmt.Errorf("unknown dependency type %T", module))
}