summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-exegesis/llvm-exegesis.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 7339baf8f8e..ed8ab6fc3f0 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -359,6 +359,11 @@ readSnippets(const LLVMState &State, llvm::StringRef Filename) {
}
void benchmarkMain() {
+#ifndef HAVE_LIBPFM
+ llvm::report_fatal_error(
+ "benchmarking unavaliable, LLVM was built without libpfm.");
+#endif
+
if (exegesis::pfm::pfmInitialize())
llvm::report_fatal_error("cannot initialize libpfm");
OpenPOWER on IntegriCloud