diff options
| author | Michael Woerister <michaelwoerister@posteo.net> | 2017-07-31 15:41:41 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo.net> | 2017-07-31 15:41:41 +0200 |
| commit | cacc31f8a348a97da8681c0e55dd106818b7c8cd (patch) | |
| tree | df74ec3f499b38b24dc37969d72e65c9284b45f0 | |
| parent | a9a0ea921b20f64f0253235704889a2950f72535 (diff) | |
| download | rust-cacc31f8a348a97da8681c0e55dd106818b7c8cd.tar.gz rust-cacc31f8a348a97da8681c0e55dd106818b7c8cd.zip | |
async-llvm(26): Print error when failing to acquire Jobserver token.
| -rw-r--r-- | src/librustc_trans/back/write.rs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index b3b155c8810..85860f0e33a 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -1389,21 +1389,25 @@ fn start_executing_work(sess: &Session, // this to spawn a new unit of work, or it may get dropped // immediately if we have no more work to spawn. Message::Token(token) => { - if let Ok(token) = token { - tokens.push(token); - - if main_thread_worker_state == MainThreadWorkerState::LLVMing { - // If the main thread token is used for LLVM work - // at the moment, we turn that thread into a regular - // LLVM worker thread, so the main thread is free - // to react to translation demand. - main_thread_worker_state = MainThreadWorkerState::Idle; - running += 1; + match token { + Ok(token) => { + tokens.push(token); + + if main_thread_worker_state == MainThreadWorkerState::LLVMing { + // If the main thread token is used for LLVM work + // at the moment, we turn that thread into a regular + // LLVM worker thread, so the main thread is free + // to react to translation demand. + main_thread_worker_state = MainThreadWorkerState::Idle; + running += 1; + } + } + Err(e) => { + let msg = &format!("failed to acquire jobserver token: {}", e); + shared_emitter.fatal(msg); + // Exit the coordinator thread + panic!() } - } else { - shared_emitter.fatal("failed to acquire jobserver token"); - // Exit the coordinator thread - panic!() } } |
