@@ -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
}
@@ -825,7 +825,7 @@ fn link_natively(
825
825
if matches ! ( flavor, LinkerFlavor :: Gnu ( Cc :: Yes , _) )
826
826
&& unknown_arg_regex. is_match ( & out)
827
827
&& ( 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" )
829
829
{
830
830
info ! ( "linker output: {:?}" , out) ;
831
831
warn ! (
@@ -864,7 +864,7 @@ fn link_natively(
864
864
assert ! ( pre_objects_static. is_empty( ) || !pre_objects_static_pie. is_empty( ) ) ;
865
865
assert ! ( post_objects_static. is_empty( ) || !post_objects_static_pie. is_empty( ) ) ;
866
866
for arg in cmd. take_args ( ) {
867
- if arg. to_string_lossy ( ) == "-static-pie" {
867
+ if arg == "-static-pie" {
868
868
// Replace the output kind.
869
869
cmd. arg ( "-static" ) ;
870
870
} else if pre_objects_static_pie. contains ( & arg) {
0 commit comments