From 2c573e933b0cebfe8426c1b56f09e76a5fb48546 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 4 Sep 2013 01:07:36 -0700 Subject: [PATCH] Don't die with an ICE on a blank library name Closes #5425 --- src/librustc/back/link.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 64fa25fde20..6422290eec5 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -616,6 +616,10 @@ pub fn build_link_meta(sess: Session, || fmt!("output file name `%s` doesn't\ appear to have a stem", output.to_str())).to_managed(); + if name.is_empty() { + sess.fatal("missing crate link meta `name`, and the \ + inferred name is blank"); + } warn_missing(sess, "name", name); name }