Disable parallel compilation when using race detector

These options aren't compatible with one another.

Change-Id: I1ec52b8fa8465edd551bcd1c20a9a902a5669e52
This commit is contained in:
Dan Willemsen 2018-04-30 14:44:22 -07:00
parent bb58119655
commit db29636ba2

View file

@ -400,7 +400,7 @@ func (p *GoPackage) Compile(config *Config, outDir string) error {
"-o", p.output,
"-p", p.Name,
"-complete", "-pack", "-nolocalimports")
if !isGo18 {
if !isGo18 && !config.Race {
cmd.Args = append(cmd.Args, "-c", fmt.Sprintf("%d", runtime.NumCPU()))
}
if config.Race {