about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-16 14:50:52 +0000
committerbors <bors@rust-lang.org>2015-08-16 14:50:52 +0000
commit2f60268f54e6e8dd6313d1898f5d846d3e5332af (patch)
treea250a992246ef0deb25d9f1a22ad8c3ed940be30 /src/rustllvm/RustWrapper.cpp
parenta49d9bab1e79d44321e6a8e1a8cb81a4ffa6bad9 (diff)
parentd17d2dd48e7f6baabfdeeef567b79013caec1a01 (diff)
downloadrust-2f60268f54e6e8dd6313d1898f5d846d3e5332af.tar.gz
rust-2f60268f54e6e8dd6313d1898f5d846d3e5332af.zip
Auto merge of #27689 - dotdash:die_odr, r=michaelwoerister
When using a generic enum type that was defined in an external crate,
our debuginfo currently claims that the concrete type (e.g. Option<i32>)
was defined in the current crate, where it was first used.

This means that if there are multiple crates that all use, for example,
Option<i32> values, they'll have conflicting debuginfo, each crate
claiming to have defined that type. This doesn't cause problems in
regular builds, but with LTO enabled, LLVM complains because it tries to
merge the debuginfo for those types and sees the ODR violations.

Since I couldn't find a way to get the file info for the external crate
that actually defined the enum, I'm working around the issue by using
"<unknown>" as the file for enum types. We'll want to re-visit and fix
this later, but this at least this fixes the ICE. And with the file
being unknown instead of wrong, the debuginfo isn't really worse than
before either.

Fixes #26447
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions