Rename PGO profile file name
PGO profile files are tied to their base revisions, and don't need
regeneration after cherry-picks. With the current naming scheme using
the long version (e.g. 8.0.7.profdata), the profile file needs to be
renamed every time we bump up the patch level during a respin of the
toolchain.
Let's change profile-file names to svn revision with trailing alphabet
suffix stripped (e.g. for r1234c, use r1234.profdata) to avoid these
unnecessary renames.
Test: python build.py --check-pgo-profile fails with old profile file
and passes with renamed profile.
Test: python toolchain/llvm/android/test_compiler.py --build-only
--target aosp_marlin-eng --no-clean-built-target
--generate-clang-profile --no-pgo ./
Change-Id: Ib72d7e5e9f040bc9e01d328fb024a258e95b12c3
diff --git a/test_compiler.py b/test_compiler.py
index 2c84131..50ec8ce 100755
--- a/test_compiler.py
+++ b/test_compiler.py
@@ -51,8 +51,7 @@
stage1_install = utils.out_path('stage1-install')
profdata = os.path.join(stage1_install, 'bin', 'llvm-profdata')
- long_version = build.extract_clang_long_version(stage1_install)
- profdata_file = '%s.profdata' % long_version
+ profdata_file = build.pgo_profdata_filename()
dist_dir = os.environ.get('DIST_DIR', utils.out_path())
out_file = os.path.join(dist_dir, profdata_file)