[fix] don't panic on failure to acquire jobserver token

This commit is contained in:
Daniil Belov 2023-03-28 12:13:42 +03:00
parent cbc064b341
commit be6a09f96b
3 changed files with 14 additions and 2 deletions

View File

@ -1452,8 +1452,8 @@ fn start_executing_work<B: ExtraBackendMethods>(
Err(e) => {
let msg = &format!("failed to acquire jobserver token: {}", e);
shared_emitter.fatal(msg);
// Exit the coordinator thread
panic!("{}", msg)
codegen_done = true;
codegen_aborted = true;
}
}
}

View File

@ -0,0 +1,8 @@
include ../../run-make-fulldeps/tools.mk
# only-linux
# Test compiler behavior in case: `jobserver-auth` points to correct pipe which is not jobserver.
all:
bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3</dev/null' 2>&1 | diff jobserver.stderr -

View File

@ -0,0 +1,4 @@
error: failed to acquire jobserver token: early EOF on jobserver pipe
error: aborting due to previous error