From 9bf9ced25407362b226a945c32f8d37072fa420c Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 2 Jan 2024 08:50:53 -0800 Subject: [PATCH] Automated rollback of commit 132a5f96d08b616ae9cda636eced1b7317a751e9. *** Reason for rollback *** Going forward, the FDO type SAFDO will no longer be used to distinguish regular and configless AutoFDO. Both flavours will use FDO type AFDO. *** Original change description *** Have getFdoBuildStamp return "SAFDO" when a .afdo profile is supplied along with xbinary_fdo. This change enables the fdo_type build stamp to be set to SAFDO in order to distinguish and track the prevalence of SAFDO in the fleet. As an alternative to this implementation, I also considered defining an SAFDO build feature and using a new file extention to identify SAFDO file. This CL is here unknown commit. I decided this implementation is preferable since from a blaze perspective, SAFDO is really... *** PiperOrigin-RevId: 595128289 Change-Id: Ie1bc2f1a7dc023ec42965cfee477a391434863bb --- .../com/google/devtools/build/lib/rules/cpp/CppHelper.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java index 4941170ac011e1..01e918ca1ff658 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java @@ -291,11 +291,7 @@ public static String getFdoBuildStamp( FeatureConfiguration featureConfiguration) { FdoContext.BranchFdoProfile branchFdoProfile = fdoContext.getBranchFdoProfile(); if (branchFdoProfile != null) { - // If the profile has a .afdo extension and was supplied to the build via the xbinary_fdo - // flag, then this is a safdo profile. - if (branchFdoProfile.isAutoFdo() && cppConfiguration.getXFdoProfileLabel() != null) { - return featureConfiguration.isEnabled(CppRuleClasses.AUTOFDO) ? "SAFDO" : null; - } + if (branchFdoProfile.isAutoFdo()) { return featureConfiguration.isEnabled(CppRuleClasses.AUTOFDO) ? "AFDO" : null; }