File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/librustc_codegen_ssa/back Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -985,15 +985,13 @@ fn get_crt_libs_path(sess: &Session) -> Option<PathBuf> {
985
985
Some ( Ok ( compiler_libs_path) ) => Some ( compiler_libs_path) ,
986
986
Some ( Err ( _) ) => None ,
987
987
_ => {
988
- let compiler = if let Some ( linker) = & sess. opts . cg . linker {
989
- linker. clone ( ) . into_os_string ( )
990
- } else if let Some ( linker) = & sess. target . target . options . linker {
991
- linker. into ( )
988
+ let cc = if let ( linker, LinkerFlavor :: Gcc ) = linker_and_flavor ( & sess) {
989
+ linker
992
990
} else {
993
991
* SYSTEM_LIBS . lock ( ) . unwrap ( ) = Some ( Err ( ( ) ) ) ;
994
992
return None ;
995
993
} ;
996
- if let Ok ( output) = Command :: new ( compiler ) . arg ( "-print-file-name=crt2.o" ) . output ( ) {
994
+ if let Ok ( output) = Command :: new ( cc ) . arg ( "-print-file-name=crt2.o" ) . output ( ) {
997
995
if let Some ( compiler_libs_path) =
998
996
PathBuf :: from ( std:: str:: from_utf8 ( & output. stdout ) . unwrap ( ) ) . parent ( )
999
997
{
You can’t perform that action at this time.
0 commit comments