Put feature arguments after command line options for LTOBackendAction
For consistency with compile actions.
RELNOTES: None
@@ -159,10 +159,11 @@ public final class LtoBackendArtifacts {
"per_object_debug_info_file", dwoFile.getExecPathString());
}
- Variables buildVariables = buildVariablesBuilder.build();
List<String> execArgs = new ArrayList<>();
- execArgs.addAll(featureConfiguration.getCommandLine("lto-backend", buildVariables));
execArgs.addAll(commandLine);
+ Variables buildVariables = buildVariablesBuilder.build();
+ // Feature options should go after --copt for consistency with compile actions.
+ execArgs.addAll(featureConfiguration.getCommandLine("lto-backend", buildVariables));
// If this is a PIC compile (set based on the CppConfiguration), the PIC
// option should be added after the rest of the command line so that it
// cannot be overridden. This is consistent with the ordering in the
