@@ -650,7 +650,7 @@ pub fn build_session_options(binary: @~str,
650650 };
651651
652652 let addl_lib_search_paths = getopts::opt_strs(matches, ~" L ").map(|s| Path(*s));
653-
653+ let linker = getopts::opt_maybe_str(matches, ~" linker ");
654654 let linker_args = getopts::opt_strs(matches, ~" link-args").flat_map( |a| {
655655 let mut args = ~[];
656656 for str::each_split_char(*a, ' ') |arg| {
@@ -676,6 +676,7 @@ pub fn build_session_options(binary: @~str,
676676 jit: jit,
677677 output_type: output_type,
678678 addl_lib_search_paths: addl_lib_search_paths,
679+ linker: linker,
679680 linker_args: linker_args,
680681 maybe_sysroot: sysroot_opt,
681682 target_triple: target,
@@ -760,6 +761,7 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
760761 optmulti ( "L" , "" , "Add a directory to the library search path" ,
761762 "PATH" ) ,
762763 optflag ( "" , "lib" , "Compile a library crate" ) ,
764+ optopt ( "" , "linker" , "Program to use for linking instead of the default." , "LINKER" ) ,
763765 optmulti ( "" , "link-args" , "FLAGS is a space-separated list of flags
764766 passed to the linker" , "FLAGS" ) ,
765767 optflag ( "" , "ls" , "List the symbols defined by a library crate" ) ,
0 commit comments