use rustc::middle::dependency_format::Linkage;
use rustc::session::Session;
use rustc::session::config::{self, CrateType, OptLevel, DebugInfo,
- CrossLangLto, Lto};
+ LinkerPluginLto, Lto};
use rustc::ty::TyCtxt;
use rustc_target::spec::{LinkerFlavor, LldFlavor};
use serialize::{json, Encoder};
}
}
-/// Linker abstraction used by back::link to build up the command to invoke a
+/// Linker abstraction used by `back::link` to build up the command to invoke a
/// linker.
///
/// This trait is the total list of requirements needed by `back::link` and
fn subsystem(&mut self, subsystem: &str);
fn group_start(&mut self);
fn group_end(&mut self);
- fn cross_lang_lto(&mut self);
+ fn linker_plugin_lto(&mut self);
// Should have been finalize(self), but we don't support self-by-value on trait objects (yet?).
fn finalize(&mut self) -> Command;
}
impl<'a> GccLinker<'a> {
/// Argument that must be passed *directly* to the linker
///
- /// These arguments need to be prepended with '-Wl,' when a gcc-style linker is used
+ /// These arguments need to be prepended with `-Wl`, when a GCC-style linker is used.
fn linker_arg<S>(&mut self, arg: S) -> &mut Self
where S: AsRef<OsStr>
{
}
}
- fn push_cross_lang_lto_args(&mut self, plugin_path: Option<&OsStr>) {
+ fn push_linker_plugin_lto_args(&mut self, plugin_path: Option<&OsStr>) {
if let Some(plugin_path) = plugin_path {
let mut arg = OsString::from("-plugin=");
arg.push(plugin_path);
}
}
- fn cross_lang_lto(&mut self) {
- match self.sess.opts.debugging_opts.cross_lang_lto {
- CrossLangLto::Disabled => {
+ fn linker_plugin_lto(&mut self) {
+ match self.sess.opts.cg.linker_plugin_lto {
+ LinkerPluginLto::Disabled => {
// Nothing to do
}
- CrossLangLto::LinkerPluginAuto => {
- self.push_cross_lang_lto_args(None);
+ LinkerPluginLto::LinkerPluginAuto => {
+ self.push_linker_plugin_lto_args(None);
}
- CrossLangLto::LinkerPlugin(ref path) => {
- self.push_cross_lang_lto_args(Some(path.as_os_str()));
+ LinkerPluginLto::LinkerPlugin(ref path) => {
+ self.push_linker_plugin_lto_args(Some(path.as_os_str()));
}
}
}
fn group_start(&mut self) {}
fn group_end(&mut self) {}
- fn cross_lang_lto(&mut self) {
+ fn linker_plugin_lto(&mut self) {
// Do nothing
}
}
fn group_start(&mut self) {}
fn group_end(&mut self) {}
- fn cross_lang_lto(&mut self) {
+ fn linker_plugin_lto(&mut self) {
// Do nothing
}
}
fn group_start(&mut self) {}
fn group_end(&mut self) {}
- fn cross_lang_lto(&mut self) {
+ fn linker_plugin_lto(&mut self) {
// Do nothing for now
}
}
fn group_end(&mut self) {
}
- fn cross_lang_lto(&mut self) {
+ fn linker_plugin_lto(&mut self) {
}
}