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

Disable header include validation via feature flag. Fixes #14346. #14394

Closed
Show file tree
Hide file tree
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 @@ -292,7 +292,7 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable
this.executionInfo = executionInfo;
this.actionName = actionName;
this.featureConfiguration = featureConfiguration;
this.needsIncludeValidation = cppSemantics.needsIncludeValidation();
this.needsIncludeValidation = cppSemantics.needsIncludeValidation() && !cppConfiguration.disableCppIncludeValidation();
this.actionClassId = actionClassId;
this.builtInIncludeDirectories = builtInIncludeDirectories;
this.additionalInputs = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,10 @@ public boolean validateTopLevelHeaderInclusions() {
return cppOptions.validateTopLevelHeaderInclusions;
}

public boolean disableCppIncludeValidation() {
return cppOptions.disableCppIncludeValidation;
}

public boolean appleGenerateDsym() {
return appleGenerateDsym;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@ public String getTypeDescription() {
+ " position-independent executables (\"-pie\").")
public boolean forcePic;

@Option(
name = "disable_cpp_include_validation",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
help =
"If true, Bazel will not validate inclusions.")
public boolean disableCppIncludeValidation;

@Option(
name = "process_headers_in_dependencies",
defaultValue = "false",
Expand Down