Skip to content

Commit 754af6c

Browse files
committed
Include the llvm-size output in the parse error message
1 parent d2f162a commit 754af6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ mod binary {
9292
let output = cmd.output().expect("failed to run llvm-size");
9393
let output_str = String::from_utf8_lossy(&output.stdout);
9494
let second_line_opt = output_str.lines().skip(1).next();
95-
let second_line = second_line_opt.expect("unexpected llvm-size line output");
95+
let second_line = second_line_opt.expect(&format!("unexpected llvm-size line output:\n{}", output_str));
9696
let text_size_opt = second_line.split_ascii_whitespace().next();
97-
let text_size = text_size_opt.expect("unexpected llvm-size output");
97+
let text_size = text_size_opt.expect(&format!("unexpected llvm-size output:\n{}", output_str));
9898
if text_size == "0" {
9999
panic!("Kernel executable has an empty text section. Perhaps the entry point was set incorrectly?\n\n\
100100
Kernel executable at `{}`\n", kernel.display());

0 commit comments

Comments
 (0)