@@ -1093,19 +1093,6 @@ public NestedSet<Artifact> getDeclaredIncludeSrcs() {
1093
1093
return context .getDeclaredIncludeSrcs ();
1094
1094
}
1095
1095
1096
- /**
1097
- * Return explicit header files (i.e., header files explicitly listed) in an order
1098
- * that is stable between builds.
1099
- */
1100
- protected final List <PathFragment > getDeclaredIncludeSrcsInStableOrder () {
1101
- List <PathFragment > paths = new ArrayList <>();
1102
- for (Artifact declaredIncludeSrc : context .getDeclaredIncludeSrcs ()) {
1103
- paths .add (declaredIncludeSrc .getExecPath ());
1104
- }
1105
- Collections .sort (paths ); // Order is not important, but stability is.
1106
- return paths ;
1107
- }
1108
-
1109
1096
@ Override
1110
1097
public ResourceSet estimateResourceConsumption (Executor executor ) {
1111
1098
return executor .getContext (actionContext ).estimateResourceConsumption (this );
@@ -1142,8 +1129,13 @@ public String computeKey() {
1142
1129
*/
1143
1130
f .addPaths (context .getDeclaredIncludeDirs ());
1144
1131
f .addPaths (context .getDeclaredIncludeWarnDirs ());
1145
- f .addPaths (getDeclaredIncludeSrcsInStableOrder ());
1146
- f .addPaths (Artifact .asSortedPathFragments (getMandatoryInputs ()));
1132
+ for (Artifact declaredIncludeSrc : context .getDeclaredIncludeSrcs ()) {
1133
+ f .addPath (declaredIncludeSrc .getExecPath ());
1134
+ }
1135
+ f .addInt (0 ); // mark the boundary between input types
1136
+ for (Artifact input : getMandatoryInputs ()) {
1137
+ f .addPath (input .getExecPath ());
1138
+ }
1147
1139
return f .hexDigestAndReset ();
1148
1140
}
1149
1141
@@ -1252,9 +1244,9 @@ public String describeKey() {
1252
1244
message .append ('\n' );
1253
1245
}
1254
1246
1255
- for (PathFragment path : getDeclaredIncludeSrcsInStableOrder ()) {
1247
+ for (Artifact src : getDeclaredIncludeSrcs ()) {
1256
1248
message .append (" Declared include source: " );
1257
- message .append (ShellEscaper .escapeString (path . getPathString ()));
1249
+ message .append (ShellEscaper .escapeString (src . getExecPathString ()));
1258
1250
message .append ('\n' );
1259
1251
}
1260
1252
0 commit comments