@@ -786,12 +786,12 @@ fn link_natively(
786
786
if matches ! ( flavor, LinkerFlavor :: Gnu ( Cc :: Yes , _) )
787
787
&& unknown_arg_regex. is_match ( & out)
788
788
&& 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" )
790
790
{
791
791
info ! ( "linker output: {:?}" , out) ;
792
792
warn ! ( "Linker does not support -no-pie command line option. Retrying without." ) ;
793
793
for arg in cmd. take_args ( ) {
794
- if arg. to_string_lossy ( ) != "-no-pie" {
794
+ if arg != "-no-pie" {
795
795
cmd. arg ( arg) ;
796
796
}
797
797
}
@@ -804,7 +804,7 @@ fn link_natively(
804
804
if matches ! ( flavor, LinkerFlavor :: Gnu ( Cc :: Yes , _) )
805
805
&& unknown_arg_regex. is_match ( & out)
806
806
&& ( out. contains ( "-static-pie" ) || out. contains ( "--no-dynamic-linker" ) )
807
- && cmd. get_args ( ) . iter ( ) . any ( |e| e. to_string_lossy ( ) == "-static-pie" )
807
+ && cmd. get_args ( ) . iter ( ) . any ( |e| e == "-static-pie" )
808
808
{
809
809
info ! ( "linker output: {:?}" , out) ;
810
810
warn ! (
@@ -843,7 +843,7 @@ fn link_natively(
843
843
assert ! ( pre_objects_static. is_empty( ) || !pre_objects_static_pie. is_empty( ) ) ;
844
844
assert ! ( post_objects_static. is_empty( ) || !post_objects_static_pie. is_empty( ) ) ;
845
845
for arg in cmd. take_args ( ) {
846
- if arg. to_string_lossy ( ) == "-static-pie" {
846
+ if arg == "-static-pie" {
847
847
// Replace the output kind.
848
848
cmd. arg ( "-static" ) ;
849
849
} else if pre_objects_static_pie. contains ( & arg) {
0 commit comments