Index: utils/perf-training/CMakeLists.txt =================================================================== --- utils/perf-training/CMakeLists.txt +++ utils/perf-training/CMakeLists.txt @@ -30,13 +30,13 @@ endif() if(NOT LLVM_PROFDATA) - message(FATAL_ERROR "Must set LLVM_PROFDATA to point to llvm-profdata to use for merging PGO data") + message(STATUS "LLVM_PROFDATA needs to point to llvm-profdata to enable merging profdata") + else() + add_custom_target(generate-profdata + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} ${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Merging profdata" + DEPENDS generate-profraw) endif() - - add_custom_target(generate-profdata - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} ${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Merging profdata" - DEPENDS generate-profraw) endif() find_program(DTRACE dtrace)