Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Export ModuleListFile in bootstrap (with fix) (#304)
Browse files Browse the repository at this point in the history
* Export ModuleListFile in bootstrap (with fix)

* Run gofmt on command.go
  • Loading branch information
c-parsons committed Jun 15, 2020
1 parent 743261c commit fe2fa04
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions bootstrap/command.go
Expand Up @@ -41,14 +41,12 @@ var (
traceFile string
runGoTests bool
noGC bool
moduleListFile string
emptyNinjaFile bool

BuildDir string
NinjaBuildDir string
SrcDir string

absSrcDir string
BuildDir string
ModuleListFile string
NinjaBuildDir string
SrcDir string
absSrcDir string
)

func init() {
Expand All @@ -63,7 +61,7 @@ func init() {
flag.StringVar(&memprofile, "memprofile", "", "write memory profile to file")
flag.BoolVar(&noGC, "nogc", false, "turn off GC for debugging")
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")
}

Expand Down Expand Up @@ -105,9 +103,9 @@ func Main(ctx *blueprint.Context, config interface{}, extraNinjaFileDeps ...stri
}

SrcDir = filepath.Dir(flag.Arg(0))
if moduleListFile != "" {
ctx.SetModuleListFile(moduleListFile)
extraNinjaFileDeps = append(extraNinjaFileDeps, moduleListFile)
if ModuleListFile != "" {
ctx.SetModuleListFile(ModuleListFile)
extraNinjaFileDeps = append(extraNinjaFileDeps, ModuleListFile)
} else {
fatalf("-l <moduleListFile> is required and must be nonempty")
}
Expand All @@ -133,7 +131,7 @@ func Main(ctx *blueprint.Context, config interface{}, extraNinjaFileDeps ...stri
topLevelBlueprintsFile: flag.Arg(0),
emptyNinjaFile: emptyNinjaFile,
runGoTests: runGoTests,
moduleListFile: moduleListFile,
moduleListFile: ModuleListFile,
}

ctx.RegisterBottomUpMutator("bootstrap_plugin_deps", pluginDeps)
Expand Down

0 comments on commit fe2fa04

Please sign in to comment.