Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmultiple definition link error when using multiple codegen units #32518
Comments
MagaTailor
changed the title
Stage1 libstd doesn't link on ARM any more
multiple definition link error in libstd on ARM
Mar 26, 2016
sanxiyn
added
the
O-ARM
label
Mar 27, 2016
This comment has been minimized.
This comment has been minimized.
|
Does it happen without codegen-units option? |
This comment has been minimized.
This comment has been minimized.
|
Ha, good question, let me check! It used to work fine even with codegen units maybe a week ago. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
cc @nikomatsakis, perhaps this is a regression from #32469 |
This comment has been minimized.
This comment has been minimized.
|
This error also isn't related to ARM, you can reproduce with a bootstrap with some number of codegen units (I used 8 locally) |
alexcrichton
removed
the
O-ARM
label
Mar 27, 2016
dotdash
changed the title
multiple definition link error in libstd on ARM
multiple definition link error when using multiple codegen units
Mar 27, 2016
This comment has been minimized.
This comment has been minimized.
|
Minimized: cgu.rs #![crate_type="lib"]
pub fn id<T>(t: T) {
}a.rs #![crate_type="lib"]
extern crate cgu;
pub mod a {
pub fn a() {
::cgu::id(());
}
}
pub mod b {
pub fn a() {
::cgu::id(());
}
}b.rs #![crate_type="lib"]
extern crate cgu;
pub mod a {
pub fn a() {
::cgu::id(());
}
}
pub mod b {
pub fn a() {
::cgu::id(());
}
}main.rs extern crate a;
extern crate b;
fn main() {
a::a::a();
b::a::a();
}The problem here is that the |
dotdash
self-assigned this
Mar 28, 2016
This comment has been minimized.
This comment has been minimized.
|
Seems likely to be a regression, yes. @dotdash, I take it from the assignment that you are fixing it? (If so, how do you plan to do so?) |
This comment has been minimized.
This comment has been minimized.
|
(I imagine that whatever we do for drop glue ought to work here, since I believe those are also shared across CGU.) |
This comment has been minimized.
This comment has been minimized.
|
OK, the assertions build (
Posting here in case it's related to the PR that'd been linked above. |
This comment has been minimized.
This comment has been minimized.
|
igd ICE is #32530. |
MagaTailor commentedMar 26, 2016
I wanted to use @dotdash's LLVM assertions patch but now my stage1 libstd fails to link. Probably unrelated but here it is:
and so on. Configured with
--enable-optimize --disable-jemalloc --enable-llvm-assertionsandRUSTFLAGS='-C codegen-units=4 -C link-args=-s'Are all these errors about memory management functions? (
--disable-jemallocbroken again?)