Chromium Code Reviews| Index: src/IceCompiler.cpp |
| diff --git a/src/IceCompiler.cpp b/src/IceCompiler.cpp |
| index bd5e8343a554bf1ada85fd1da831f64ce6007770..9735b2a0092e040e5275b638cbe79685c35706c6 100644 |
| --- a/src/IceCompiler.cpp |
| +++ b/src/IceCompiler.cpp |
| @@ -63,11 +63,11 @@ 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) { |
| + Ctx.getErrorStatus()->assign(EC_Args); |
|
Jim Stichnoth
2016/03/25 04:31:04
I'm curious why this line got moved?
Karl
2016/03/29 17:35:02
Programmer error. I initially thought I needed to
|
| // TODO(stichnot): Access the actual command-line argument via |
|
Jim Stichnoth
2016/03/25 04:31:04
Can you just delete this TODO? Pretty sure it's n
Karl
2016/03/29 17:35:02
Done.
|
| // llvm::Option.ArgStr and .ValueStr . |
| Ctx.getStrError() |
| << "Error: only --filetype=obj is supported in this build.\n"; |
| - Ctx.getErrorStatus()->assign(EC_Args); |
| return; |
| } |
| @@ -90,6 +90,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 |
| @@ -108,6 +109,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; |
| } |
| @@ -118,6 +120,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; |
| } |