rustc: Fix some ThinLTO internalization
First the `addPreservedGUID` function forgot to take care of "alias" summaries. I'm not 100% sure what this is but the current code now matches upstream. Next the `computeDeadSymbols` return value wasn't actually being used, but it needed to be used! Together these should... Closes #45195
This commit is contained in:
parent
df095cefe2
commit
2e1c4cd0f5
8 changed files with 67 additions and 10 deletions
16
src/test/run-pass/thinlto/auxiliary/dylib.rs
Normal file
16
src/test/run-pass/thinlto/auxiliary/dylib.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z thinlto -C codegen-units=8
|
||||
|
||||
#[inline]
|
||||
pub fn foo(b: u8) {
|
||||
b.to_string();
|
||||
}
|
||||
17
src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
Normal file
17
src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
pub fn bar() -> u32 {
|
||||
3
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue