@@ -786,12 +786,12 @@ fn link_natively(
786786 if matches ! ( flavor, LinkerFlavor :: Gnu ( Cc :: Yes , _) )
787787 && unknown_arg_regex. is_match ( & out)
788788 && out. contains ( "-no-pie" )
789- && cmd. get_args ( ) . iter ( ) . any ( |e| e. to_string_lossy ( ) == "-no-pie" )
789+ && cmd. get_args ( ) . iter ( ) . any ( |e| e == "-no-pie" )
790790 {
791791 info ! ( "linker output: {:?}" , out) ;
792792 warn ! ( "Linker does not support -no-pie command line option. Retrying without." ) ;
793793 for arg in cmd. take_args ( ) {
794- if arg. to_string_lossy ( ) != "-no-pie" {
794+ if arg != "-no-pie" {
795795 cmd. arg ( arg) ;
796796 }
797797 }
@@ -825,7 +825,7 @@ fn link_natively(
825825 if matches ! ( flavor, LinkerFlavor :: Gnu ( Cc :: Yes , _) )
826826 && unknown_arg_regex. is_match ( & out)
827827 && ( out. contains ( "-static-pie" ) || out. contains ( "--no-dynamic-linker" ) )
828- && cmd. get_args ( ) . iter ( ) . any ( |e| e. to_string_lossy ( ) == "-static-pie" )
828+ && cmd. get_args ( ) . iter ( ) . any ( |e| e == "-static-pie" )
829829 {
830830 info ! ( "linker output: {:?}" , out) ;
831831 warn ! (
@@ -864,7 +864,7 @@ fn link_natively(
864864 assert ! ( pre_objects_static. is_empty( ) || !pre_objects_static_pie. is_empty( ) ) ;
865865 assert ! ( post_objects_static. is_empty( ) || !post_objects_static_pie. is_empty( ) ) ;
866866 for arg in cmd. take_args ( ) {
867- if arg. to_string_lossy ( ) == "-static-pie" {
867+ if arg == "-static-pie" {
868868 // Replace the output kind.
869869 cmd. arg ( "-static" ) ;
870870 } else if pre_objects_static_pie. contains ( & arg) {
0 commit comments