[all-commits] [llvm/llvm-project] be0676: [clang][cmake] Fixes for PGO builds when invoking ...
Tom Stellard via All-commits
all-commits at lists.llvm.org
Mon Jun 10 13:02:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be067615453bab711fd4996c3c235ca996a306a1
https://github.com/llvm/llvm-project/commit/be067615453bab711fd4996c3c235ca996a306a1
Author: Tom Stellard <tstellar at redhat.com>
Date: 2024-06-10 (Mon, 10 Jun 2024)
Changed paths:
M clang/CMakeLists.txt
M clang/cmake/caches/Release.cmake
M clang/utils/perf-training/CMakeLists.txt
Log Message:
-----------
[clang][cmake] Fixes for PGO builds when invoking ninja twice (#92591)
This fixes two problems with the 2-stage PGO builds. The first problem
was that the stage2-instrumented and stage2 targets would not be built
on the second ninja invocation. For example:
This would work as expected.
$ ninja -v -C build stage2-instrumented-generate-profdata
Edit a file.
$ touch llvm/lib/Support/StringExtras.cpp
This would rebuild stage1 only and not build stage2-instrumented or
regenerate the profile data.
$ ninja -v -C build stage2-instrumented-generate-profdata
The second problem was that in some cases, the profile data would be
regenerated, but not all of the stage2 targets would be rebuilt. One
common scenario where this would happen is:
This would work as expected.
$ ninja -C build stage2-check-all
This would regenerate the profile data, but then only build the
targets that were needed for install, but weren't needed for
check-all. This would cause errors like:
ld.lld: error: Function Import: link error: linking module flags
'ProfileSummary': IDs have conflicting values in ...
This is because the executibles being built for the install target
used the new profile data, but they were linking with libraries that
used the old profile data.
$ ninja -C build stage2-install
With this change we can re-enable PGO for the release builds.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list