@@ -2620,11 +2620,18 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
2620
2620
Value == " -mbig-obj" )
2621
2621
continue ; // LLVM handles bigobj automatically
2622
2622
2623
+ auto Equal = Value.split (' =' );
2623
2624
switch (C.getDefaultToolChain ().getArch ()) {
2624
2625
default :
2625
2626
break ;
2626
2627
case llvm::Triple::x86:
2627
2628
case llvm::Triple::x86_64:
2629
+ if (Equal.first == " -mrelax-relocations" ||
2630
+ Equal.first == " --mrelax-relocations" ) {
2631
+ UseRelaxRelocations = Equal.second == " yes" ;
2632
+ if (llvm::is_contained ({" yes" , " no" }, Equal.second ))
2633
+ continue ;
2634
+ }
2628
2635
if (Value == " -msse2avx" ) {
2629
2636
CmdArgs.push_back (" -msse2avx" );
2630
2637
continue ;
@@ -2641,10 +2648,10 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
2641
2648
case llvm::Triple::thumbeb:
2642
2649
case llvm::Triple::arm:
2643
2650
case llvm::Triple::armeb:
2644
- if (Value. starts_with ( " -mimplicit-it= " ) ) {
2651
+ if (Equal. first == " -mimplicit-it" ) {
2645
2652
// Only store the value; the last value set takes effect.
2646
- ImplicitIt = Value. split ( " = " ) .second ;
2647
- if (CheckARMImplicitITArg (ImplicitIt ))
2653
+ ImplicitIt = Equal .second ;
2654
+ if (CheckARMImplicitITArg (Equal. second ))
2648
2655
continue ;
2649
2656
}
2650
2657
if (Value == " -mthumb" )
@@ -2719,12 +2726,6 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
2719
2726
Crel = false ;
2720
2727
} else if (Value == " --allow-experimental-crel" ) {
2721
2728
ExperimentalCrel = true ;
2722
- } else if (Value == " -mrelax-relocations=yes" ||
2723
- Value == " --mrelax-relocations=yes" ) {
2724
- UseRelaxRelocations = true ;
2725
- } else if (Value == " -mrelax-relocations=no" ||
2726
- Value == " --mrelax-relocations=no" ) {
2727
- UseRelaxRelocations = false ;
2728
2729
} else if (Value.starts_with (" -I" )) {
2729
2730
CmdArgs.push_back (Value.data ());
2730
2731
// We need to consume the next argument if the current arg is a plain
0 commit comments