From db29636ba2602be2899daa27876a06aecd2c3c0e Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 30 Apr 2018 14:44:22 -0700 Subject: [PATCH] Disable parallel compilation when using race detector These options aren't compatible with one another. Change-Id: I1ec52b8fa8465edd551bcd1c20a9a902a5669e52 --- microfactory/microfactory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microfactory/microfactory.go b/microfactory/microfactory.go index 845238b..a70d3c5 100644 --- a/microfactory/microfactory.go +++ b/microfactory/microfactory.go @@ -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 {