about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back/command.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-09-05 11:23:45 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-09-11 11:31:38 +1000
commit482d63673cbb2cec971f85653ff5babbf9bce0ce (patch)
tree02d76f1d78cf080211e67a2012572b863efd232c /src/librustc_codegen_ssa/back/command.rs
parent5a57f46cbc4dc1e84553b0c3093912dc3955bfe9 (diff)
downloadrust-482d63673cbb2cec971f85653ff5babbf9bce0ce.tar.gz
rust-482d63673cbb2cec971f85653ff5babbf9bce0ce.zip
Use `Symbol` in `Linker`.
Diffstat (limited to 'src/librustc_codegen_ssa/back/command.rs')
-rw-r--r--src/librustc_codegen_ssa/back/command.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_codegen_ssa/back/command.rs b/src/librustc_codegen_ssa/back/command.rs
index 340cc772e5f..2c2ede5e189 100644
--- a/src/librustc_codegen_ssa/back/command.rs
+++ b/src/librustc_codegen_ssa/back/command.rs
@@ -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>>,