[clang] [perf-training] Fix dependencies when using -DCLANG_PGO_TRAINING_DATA_SOURCE_DIR (PR #108488)
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 21:18:02 PDT 2024
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/108488
The generate-profraw-external target needs to be built after clang, but this was not modeled correctly in the CMake dependencies. The new dependency ordering ensures that clang is built before generate-profraw-external.
Old Dependencies:
generate-profdata -> clang -> generate-profraw
-> generate-profraw-external
New Dependencies:
generate-profdata -> clang -> generate-profraw -> generate-profraw-external
>From 227e2314df69949e2972ca26fac2080bd6304afc Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 13 Sep 2024 04:06:36 +0000
Subject: [PATCH] [perf-training] Fix dependencies when using
-DCLANG_PGO_TRAINING_DATA_SOURCE_DIR
The generate-profraw-external target needs to be built after clang, but
this was not modeled correctly in the CMake depencies. The new
dependency ordering ensures that clang is built before
generate-profraw-external.
Old Dependencies:
generate-profdata -> clang -> generate-profraw
-> generate-profraw-external
New Dependencies:
generate-profdata -> clang -> generate-profraw -> generate-profraw-external
---
clang/utils/perf-training/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/utils/perf-training/CMakeLists.txt b/clang/utils/perf-training/CMakeLists.txt
index 49673790ff6e84..7790e373add57f 100644
--- a/clang/utils/perf-training/CMakeLists.txt
+++ b/clang/utils/perf-training/CMakeLists.txt
@@ -46,8 +46,8 @@ if(LLVM_BUILD_INSTRUMENTED)
add_custom_target(generate-profdata DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clang.profdata)
if (CLANG_PGO_TRAINING_DATA_SOURCE_DIR)
llvm_ExternalProject_Add(generate-profraw-external ${CLANG_PGO_TRAINING_DATA_SOURCE_DIR}
- USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL DEPENDS generate-profraw)
- add_dependencies(generate-profdata generate-profraw-external)
+ USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL)
+ add_dependencies(generate-profraw generate-profraw-external)
endif()
endif()
endif()
More information about the cfe-commits
mailing list