@@ -69,7 +69,12 @@ struct LdLinker {
6969impl LdLinker {
7070 fn new ( target : & spec:: Target ) -> Self {
7171 LdLinker {
72- args : target. options . pre_link_args . clone ( ) ,
72+ args : target
73+ . options
74+ . pre_link_args
75+ . iter ( )
76+ . map ( |x| x. to_string ( ) )
77+ . collect ( ) ,
7378 }
7479 }
7580}
@@ -156,14 +161,19 @@ impl Ld64Linker {
156161 . next ( )
157162 . expect ( "LLVM target must have a hyphen" ) ;
158163
159- let mut args = target. options . pre_link_args . clone ( ) ;
164+ let mut args: Vec < String > = target
165+ . options
166+ . pre_link_args
167+ . iter ( )
168+ . map ( |x| x. to_string ( ) )
169+ . collect ( ) ;
160170 args. push ( format ! ( "-arch" ) ) ;
161171 args. push ( format ! ( "{}" , arch_name) ) ;
162- let ( a, b, c) = target. options . min_os_version . unwrap ( ) ;
163- args. push ( format ! ( "-platform_version" ) ) ;
164- args. push ( format ! ( "{}" , target. options. os) ) ;
165- args. push ( format ! ( "{}.{}.{}" , a, b, c) ) ;
166- args. push ( format ! ( "{}.{}.{}" , a, b + 1 , c) ) ;
172+ // let (a, b, c) = target.options.min_os_version.unwrap();
173+ // args.push(format!("-platform_version"));
174+ // args.push(format!("{}", target.options.os));
175+ // args.push(format!("{}.{}.{}", a, b, c));
176+ // args.push(format!("{}.{}.{}", a, b + 1, c));
167177
168178 Ld64Linker {
169179 args,
@@ -238,7 +248,12 @@ struct MsvcLinker {
238248impl MsvcLinker {
239249 fn new ( target : & spec:: Target ) -> Self {
240250 MsvcLinker {
241- args : target. options . pre_link_args . clone ( ) ,
251+ args : target
252+ . options
253+ . pre_link_args
254+ . iter ( )
255+ . map ( |x| x. to_string ( ) )
256+ . collect ( ) ,
242257 }
243258 }
244259}
0 commit comments