diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java | 5 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/FdoProfileRule.java | 11 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java index ab371197d3..316c9a6d03 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java @@ -343,11 +343,6 @@ public class CcToolchain implements RuleConfiguredTargetFactory { fdoProvider.getFdoPath() != null ? fdoProvider.getFdoPath() : fdoProvider.getProfileArtifact().getPath().asFragment(); - // Unlike --fdo_optimize, --fdo_profile should not allow .afdo profiles. - if (fdoZip != null && CppFileTypes.GCC_AUTO_PROFILE.matches(fdoZip.getPathString())) { - ruleContext.ruleError("Invalid extension for FDO profile file."); - return null; - } } } diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoProfileRule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoProfileRule.java index 020f9f0439..9b213e751d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoProfileRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoProfileRule.java @@ -32,9 +32,9 @@ public final class FdoProfileRule implements RuleDefinition { .requiresConfigurationFragments(CppConfiguration.class) /* <!-- #BLAZE_RULE(fdo_profile).ATTRIBUTE(profile) --> Label of the FDO profile. The FDO file can have one of the following extensions: - .profraw for unindexed LLVM profile, .profdata fo indexed LLVM profile, .zip - that holds GCC gcda profile or LLVM profraw profile. The label can also point to an - fdo_absolute_path_profile rule. + .profraw for unindexed LLVM profile, .profdata for indexed LLVM profile, .zip + that holds GCC gcda profile or LLVM profraw profile, or .afdo for AutoFDO profile. + The label can also point to an fdo_absolute_path_profile rule. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add( attr("profile", LABEL) @@ -42,12 +42,13 @@ public final class FdoProfileRule implements RuleDefinition { FileTypeSet.of( CppFileTypes.LLVM_PROFILE_RAW, CppFileTypes.LLVM_PROFILE, + CppFileTypes.GCC_AUTO_PROFILE, FileType.of(".zip"))) .singleArtifact()) /* <!-- #BLAZE_RULE(fdo_profile).ATTRIBUTE(absolute_path_profile) --> Absolute path to the FDO profile. The FDO file can have one of the following extensions: - .profraw for unindexed LLVM profile, .profdata fo indexed LLVM profile, .zip - that holds GCC gcda profile or LLVM profraw profile. + .profraw for unindexed LLVM profile, .profdata for indexed LLVM profile, .zip + that holds GCC gcda profile or LLVM profraw profile, or .afdo for AutoFDO profile. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("absolute_path_profile", Type.STRING)) .advertiseProvider(FdoProfileProvider.class) |