Use Symbol in Linker.

This commit is contained in:
Nicholas Nethercote 2019-09-05 11:23:45 +10:00
parent 5a57f46cbc
commit 482d63673c
5 changed files with 65 additions and 52 deletions

View file

@ -8,6 +8,7 @@ use std::mem;
use std::process::{self, Output};
use rustc_target::spec::LldFlavor;
use syntax::symbol::Symbol;
#[derive(Clone)]
pub struct Command {
@ -49,6 +50,11 @@ impl Command {
self
}
pub fn sym_arg(&mut self, arg: Symbol) -> &mut Command {
self.arg(&arg.as_str());
self
}
pub fn args<I>(&mut self, args: I) -> &mut Command
where
I: IntoIterator<Item: AsRef<OsStr>>,