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:
commit
9c5c2d53e4
2 changed files with 2 additions and 6 deletions
|
@ -39,7 +39,7 @@ var (
|
||||||
// These variables are the only configuration needed by the bootstrap
|
// These variables are the only configuration needed by the bootstrap
|
||||||
// modules.
|
// modules.
|
||||||
srcDirVariable = bootstrapVariable("srcDir", func(c BootstrapConfig) string {
|
srcDirVariable = bootstrapVariable("srcDir", func(c BootstrapConfig) string {
|
||||||
return c.SrcDir()
|
return "."
|
||||||
})
|
})
|
||||||
buildDirVariable = bootstrapVariable("buildDir", func(c BootstrapConfig) string {
|
buildDirVariable = bootstrapVariable("buildDir", func(c BootstrapConfig) string {
|
||||||
return c.BuildDir()
|
return c.BuildDir()
|
||||||
|
@ -76,9 +76,6 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
type BootstrapConfig interface {
|
type BootstrapConfig interface {
|
||||||
// The top-level directory of the source tree
|
|
||||||
SrcDir() string
|
|
||||||
|
|
||||||
// The directory where files emitted during bootstrapping are located.
|
// The directory where files emitted during bootstrapping are located.
|
||||||
// Usually NinjaBuildDir() + "/soong".
|
// Usually NinjaBuildDir() + "/soong".
|
||||||
BuildDir() string
|
BuildDir() string
|
||||||
|
|
|
@ -2,7 +2,6 @@ package bootstrap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
|
@ -42,7 +41,7 @@ func ModuleTypeDocs(ctx *blueprint.Context, config interface{}, factories map[st
|
||||||
switch m := module.(type) {
|
switch m := module.(type) {
|
||||||
case (*goPackage):
|
case (*goPackage):
|
||||||
pkgFiles[m.properties.PkgPath] = pathtools.PrefixPaths(m.properties.Srcs,
|
pkgFiles[m.properties.PkgPath] = pathtools.PrefixPaths(m.properties.Srcs,
|
||||||
filepath.Join(config.(BootstrapConfig).SrcDir(), ctx.ModuleDir(m)))
|
ctx.ModuleDir(m))
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("unknown dependency type %T", module))
|
panic(fmt.Errorf("unknown dependency type %T", module))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue