1 // compile-flags: -C lto
2 // aux-build:lto-rustc-loads-linker-plugin.rs
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`.
13 extern crate lto_rustc_loads_linker_plugin;
16 lto_rustc_loads_linker_plugin::foo();