Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable C++ deps pruning on Windows when PARSE_SHOWINCLUDES is available. #17928

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ private ImmutableList<Artifact> getBuiltinIncludeFiles() {
return result.build();
}

private boolean shouldParseShowIncludes() {
return featureConfiguration.isEnabled(CppRuleClasses.PARSE_SHOWINCLUDES);
}

/**
* Returns the list of mandatory inputs for the {@link CppCompileAction} as configured.
*/
Expand All @@ -361,7 +365,7 @@ NestedSet<Artifact> buildMandatoryInputs() {
if (grepIncludes != null) {
realMandatoryInputsBuilder.add(grepIncludes);
}
if (!shouldScanIncludes && dotdFile == null) {
if (!shouldScanIncludes && dotdFile == null && !shouldParseShowIncludes()) {
konste marked this conversation as resolved.
Show resolved Hide resolved
realMandatoryInputsBuilder.addTransitive(ccCompilationContext.getDeclaredIncludeSrcs());
realMandatoryInputsBuilder.addTransitive(additionalPrunableHeaders);
}
Expand Down Expand Up @@ -483,7 +487,7 @@ public boolean useDotdFile(Artifact sourceFile) {

public boolean dotdFilesEnabled() {
return cppSemantics.needsDotdInputPruning(configuration)
&& !featureConfiguration.isEnabled(CppRuleClasses.PARSE_SHOWINCLUDES);
&& !shouldParseShowIncludes();
}

public boolean serializedDiagnosticsFilesEnabled() {
Expand Down