From 055df07ab927e71f89a6f2f7156bb7ea6eea0199 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Sat, 18 Jun 2022 11:05:54 +0100 Subject: [PATCH] Add LLVM_USE_PERF option to account for the same flag in target llvm --- .ci.yml | 2 +- CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.ci.yml b/.ci.yml index 73723bd..39b254e 100644 --- a/.ci.yml +++ b/.ci.yml @@ -15,7 +15,7 @@ steps: image: rg.fr-par.scw.cloud/serene/llvm:15-8 commands: - cmake --version - - ./builder build + - ./builder build -DLLVM_USE_PERF=ON - ln -s build/compile_commands.json ./compile_commands.json - name: Linters diff --git a/CMakeLists.txt b/CMakeLists.txt index ab231b6..d2966e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,10 +279,13 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) # endforeach(arch) + option(LLVM_USE_PERF "If the target LLVM build is built with LLVM_USE_PERF" OFF) set(CONDITIONAL_COMPONENTS "") + if(LLVM_USE_PERF) list(APPEND CONDITIONAL_COMPONENTS PerfJITEvents) endif() + llvm_map_components_to_libnames(llvm_libs core support