Move .includes files, which are required for include scanning, out of the
includes output directory, which is wiped for every symlink action.  Instead,
put .includes files in genfiles.
TESTED=manually using repro instructions in b/64534488#comment15
@@ -616,9 +616,8 @@ public class CppHelper {
private static Artifact getIncludesOutput(RuleContext ruleContext, Artifact src) {
Preconditions.checkArgument(!src.isSourceArtifact(), src);
- return ruleContext.getShareableArtifact(
- src.getRootRelativePath().replaceName(src.getFilename() + GREPPED_INCLUDES_SUFFIX),
- src.getRoot());
+ return ruleContext.getGenfilesArtifact(
+ src.getRootRelativePath().replaceName(src.getFilename() + GREPPED_INCLUDES_SUFFIX));
}
/**
