Index: src/IceCompiler.cpp |
diff --git a/src/IceCompiler.cpp b/src/IceCompiler.cpp |
index 4ad7730dd7ce30332c8b5ba9cb8268ff54bc8193..08ce5a520a3f284d06621fc1e0c721a583b0820d 100644 |
--- a/src/IceCompiler.cpp |
+++ b/src/IceCompiler.cpp |
@@ -62,8 +62,6 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, |
// allows only --filetype=obj. Check here to avoid cryptic error messages |
// downstream. |
if (!BuildDefs::dump() && Ctx.getFlags().getOutFileType() != FT_Elf) { |
- // TODO(stichnot): Access the actual command-line argument via |
- // llvm::Option.ArgStr and .ValueStr . |
Ctx.getStrError() |
<< "Error: only --filetype=obj is supported in this build.\n"; |
Ctx.getErrorStatus()->assign(EC_Args); |
@@ -89,6 +87,7 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, |
Ctx.getStrError() |
<< "non BuildOnRead is not supported w/ PNACL_BROWSER_TRANSLATOR\n"; |
Ctx.getErrorStatus()->assign(EC_Args); |
+ Ctx.waitForWorkerThreads(); |
return; |
} |
// Globals must be kept alive after lowering when converting from LLVM to |
@@ -107,6 +106,7 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, |
if (!Mod) { |
Err.print(Flags.getAppName().c_str(), llvm::errs()); |
Ctx.getErrorStatus()->assign(EC_Bitcode); |
+ Ctx.waitForWorkerThreads(); |
return; |
} |
@@ -117,6 +117,7 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, |
Ctx.getStrError() << "Error: Build doesn't allow LLVM IR, " |
<< "--build-on-read=0 not allowed\n"; |
Ctx.getErrorStatus()->assign(EC_Args); |
+ Ctx.waitForWorkerThreads(); |
return; |
} |