about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-05-02 12:46:58 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-05-02 12:46:58 -0400
commit7aa10e616bc3d4d43051c04a074d7e573fb72886 (patch)
tree19474143b34ddbc14013574aaeb9589220deebc1 /src
parent89377eafe163eee7f636a758ef117399f58c3598 (diff)
downloadrust-7aa10e616bc3d4d43051c04a074d7e573fb72886.tar.gz
rust-7aa10e616bc3d4d43051c04a074d7e573fb72886.zip
make link_args use spaces as separators
Lots of linking arguments need to be passed as -Wl,--foo so giving the
comma meaning at the rustc layer makes those flags impossible to pass.

Multiple arguments can now be passed from a shell by quoting the
argument: --link-args='-lfoo -Wl,--as-needed'.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/driver/driver.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs
index afd0e0acfe9..5e5d0640d80 100644
--- a/src/librustc/driver/driver.rs
+++ b/src/librustc/driver/driver.rs
@@ -653,7 +653,7 @@ pub fn build_session_options(binary: @~str,
 
     let linker_args = getopts::opt_strs(matches, ~"link-args").flat_map( |a| {
         let mut args = ~[];
-        for str::each_split_char(*a, ',') |arg| {
+        for str::each_split_char(*a, ' ') |arg| {
             args.push(str::from_slice(arg));
         }
         args
@@ -760,7 +760,7 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
   optmulti("L", "",   "Add a directory to the library search path",
                               "PATH"),
   optflag("",  "lib", "Compile a library crate"),
-  optmulti("",  "link-args", "FLAGS is a comma-separated list of flags
+  optmulti("",  "link-args", "FLAGS is a space-separated list of flags
                             passed to the linker", "FLAGS"),
   optflag("",  "ls",  "List the symbols defined by a library crate"),
   optflag("", "no-trans",