Export ModuleListFile in bootstrap (with fix) (#304)
* Export ModuleListFile in bootstrap (with fix) * Run gofmt on command.go
This commit is contained in:
parent
743261c07e
commit
fe2fa04c30
1 changed files with 10 additions and 12 deletions
|
@ -41,14 +41,12 @@ var (
|
||||||
traceFile string
|
traceFile string
|
||||||
runGoTests bool
|
runGoTests bool
|
||||||
noGC bool
|
noGC bool
|
||||||
moduleListFile string
|
|
||||||
emptyNinjaFile bool
|
emptyNinjaFile bool
|
||||||
|
BuildDir string
|
||||||
BuildDir string
|
ModuleListFile string
|
||||||
NinjaBuildDir string
|
NinjaBuildDir string
|
||||||
SrcDir string
|
SrcDir string
|
||||||
|
absSrcDir string
|
||||||
absSrcDir string
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -63,7 +61,7 @@ func init() {
|
||||||
flag.StringVar(&memprofile, "memprofile", "", "write memory profile to file")
|
flag.StringVar(&memprofile, "memprofile", "", "write memory profile to file")
|
||||||
flag.BoolVar(&noGC, "nogc", false, "turn off GC for debugging")
|
flag.BoolVar(&noGC, "nogc", false, "turn off GC for debugging")
|
||||||
flag.BoolVar(&runGoTests, "t", false, "build and run go tests during bootstrap")
|
flag.BoolVar(&runGoTests, "t", false, "build and run go tests during bootstrap")
|
||||||
flag.StringVar(&moduleListFile, "l", "", "file that lists filepaths to parse")
|
flag.StringVar(&ModuleListFile, "l", "", "file that lists filepaths to parse")
|
||||||
flag.BoolVar(&emptyNinjaFile, "empty-ninja-file", false, "write out a 0-byte ninja file")
|
flag.BoolVar(&emptyNinjaFile, "empty-ninja-file", false, "write out a 0-byte ninja file")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,9 +103,9 @@ func Main(ctx *blueprint.Context, config interface{}, extraNinjaFileDeps ...stri
|
||||||
}
|
}
|
||||||
|
|
||||||
SrcDir = filepath.Dir(flag.Arg(0))
|
SrcDir = filepath.Dir(flag.Arg(0))
|
||||||
if moduleListFile != "" {
|
if ModuleListFile != "" {
|
||||||
ctx.SetModuleListFile(moduleListFile)
|
ctx.SetModuleListFile(ModuleListFile)
|
||||||
extraNinjaFileDeps = append(extraNinjaFileDeps, moduleListFile)
|
extraNinjaFileDeps = append(extraNinjaFileDeps, ModuleListFile)
|
||||||
} else {
|
} else {
|
||||||
fatalf("-l <moduleListFile> is required and must be nonempty")
|
fatalf("-l <moduleListFile> is required and must be nonempty")
|
||||||
}
|
}
|
||||||
|
@ -133,7 +131,7 @@ func Main(ctx *blueprint.Context, config interface{}, extraNinjaFileDeps ...stri
|
||||||
topLevelBlueprintsFile: flag.Arg(0),
|
topLevelBlueprintsFile: flag.Arg(0),
|
||||||
emptyNinjaFile: emptyNinjaFile,
|
emptyNinjaFile: emptyNinjaFile,
|
||||||
runGoTests: runGoTests,
|
runGoTests: runGoTests,
|
||||||
moduleListFile: moduleListFile,
|
moduleListFile: ModuleListFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.RegisterBottomUpMutator("bootstrap_plugin_deps", pluginDeps)
|
ctx.RegisterBottomUpMutator("bootstrap_plugin_deps", pluginDeps)
|
||||||
|
|
Loading…
Reference in a new issue