fix flang .mode file conflict issue

This commit is contained in:
Clarence 2022-04-17 09:20:32 +08:00
parent 09cd80c589
commit c31c677f0b

View File

@ -81,10 +81,19 @@ func Compile(args []string, compiler string) (exitCode int) {
var bcObjLinks []bitcodeToObjectLink var bcObjLinks []bitcodeToObjectLink
var newObjectFiles []string var newObjectFiles []string
if compiler == "flang" {
wg.Add(1)
go execCompile(compilerExecName, pr, &wg, &ok)
wg.Wait();
wg.Add(1);
go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg)
wg.Wait()
} else {
wg.Add(2) wg.Add(2)
go execCompile(compilerExecName, pr, &wg, &ok) go execCompile(compilerExecName, pr, &wg, &ok)
go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg) go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg)
wg.Wait() wg.Wait()
}
//grok the exit code //grok the exit code
if !ok { if !ok {