Improve ICE message when data-layouts don't match
LLVM target name does not necessarily match the Rust target name and it can be confusing when the ICE message is describing a target other than has been specified on the command line.
This commit is contained in:
parent
aa65b08b1d
commit
6440785304
1 changed files with 6 additions and 5 deletions
|
@ -149,11 +149,12 @@ pub unsafe fn create_module(
|
||||||
|
|
||||||
if !custom_llvm_used && target_data_layout != llvm_data_layout {
|
if !custom_llvm_used && target_data_layout != llvm_data_layout {
|
||||||
bug!(
|
bug!(
|
||||||
"data-layout for builtin `{}` target, `{}`, \
|
"data-layout for target `{rustc_target}`, `{rustc_layout}`, \
|
||||||
differs from LLVM default, `{}`",
|
differs from LLVM target's `{llvm_target}` default layout, `{llvm_layout}`",
|
||||||
sess.target.llvm_target,
|
rustc_target = sess.opts.target_triple,
|
||||||
target_data_layout,
|
rustc_layout = target_data_layout,
|
||||||
llvm_data_layout
|
llvm_target = sess.target.llvm_target,
|
||||||
|
llvm_layout = llvm_data_layout
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue