]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | // compile-flags: -C lto |
2 | // aux-build:lto-rustc-loads-linker-plugin.rs | |
3 | // run-pass | |
4 | // no-prefer-dynamic | |
5 | ||
6 | // This test ensures that if a dependency was compiled with | |
7 | // `-Clinker-plugin-lto` then we can compile with `-Clto` and still link against | |
8 | // that upstream rlib. This should work because LTO implies we're not actually | |
9 | // linking against upstream rlibs since we're generating the object code | |
10 | // locally. This test will fail if rustc can't find bytecode in rlibs compiled | |
11 | // with `-Clinker-plugin-lto`. | |
12 | ||
13 | extern crate lto_rustc_loads_linker_plugin; | |
14 | ||
15 | fn main() { | |
16 | lto_rustc_loads_linker_plugin::foo(); | |
17 | } |