[clang] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 08:48:16 PST 2024


================
@@ -1,6 +1,10 @@
+include(LLVMExternalProjectUtils)
+
 set(CLANG_PGO_TRAINING_DATA "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH
   "The path to a lit testsuite containing samples for PGO and order file generation"
   )
+set(CLANG_PGO_TRAINING_DATA_SOURCE_DIR OFF CACHE STRING "Path to source directory containing cmake project with source files to use for generating pgo data")
+set(CLANG_PERF_TRAINING_DEPS "" CACHE STRING "Extra dependencies needed to build the PGO training data.")
----------------
petrhosek wrote:

I don't see this variable being used anywhere, should it be added as a dependency of `generate-profraw-external`? I'd also consider naming it `CLANG_PGO_TRAINING_DEPS` for consistency with other variables in this file.

https://github.com/llvm/llvm-project/pull/78879


More information about the cfe-commits mailing list