From 6ec924c12be38c4cf4905b1b4e5a143c851d5150 Mon Sep 17 00:00:00 2001 From: "Lukacs T. Berki" Date: Mon, 16 Aug 2021 17:04:50 +0200 Subject: [PATCH] Remove Srcdir() from BootstrapConfig. It was always ".". Test: Presubmits. Change-Id: I0612b9b07233659adc708b9710db9aec6e24f224 --- bootstrap/config.go | 5 +---- bootstrap/writedocs.go | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bootstrap/config.go b/bootstrap/config.go index 7ab1ea2..01961dd 100644 --- a/bootstrap/config.go +++ b/bootstrap/config.go @@ -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 diff --git a/bootstrap/writedocs.go b/bootstrap/writedocs.go index 91ffe1b..3283e20 100644 --- a/bootstrap/writedocs.go +++ b/bootstrap/writedocs.go @@ -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)) }