From a0ca3cdfa53bea29a20e6abf532afb7980f5bdb2 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 13 Jul 2023 09:42:39 +0200 Subject: [PATCH] revive LLVM support (WIP) --- CMakeLists.txt | 18 +++++++++++------- src/main.cpp | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f07fd8..bc11091 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,13 +15,17 @@ if(TARGET tcc::tcc) endif() if(WITH_LLVM) - if(DEFINED ENV{LLVM_HOME}) - find_path (LLVM_DIR LLVM-Config.cmake $ENV{LLVM_HOME}/lib/cmake/llvm) - endif(DEFINED ENV{LLVM_HOME}) - find_package(LLVM REQUIRED CONFIG) - message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") - message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") - llvm_map_components_to_libnames(llvm_libs support core mcjit x86codegen x86asmparser) + if(FALSE) + if(DEFINED ENV{LLVM_HOME}) + find_path (LLVM_DIR LLVM-Config.cmake $ENV{LLVM_HOME}/lib/cmake/llvm) + endif(DEFINED ENV{LLVM_HOME}) + find_package(LLVM REQUIRED CONFIG) + message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") + message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") + llvm_map_components_to_libnames(llvm_libs support core mcjit x86codegen x86asmparser) + else() + find_package(LLVM REQUIRED LLVMSupport LLVMCore LLVMMCJIT LLVMX86CodeGen LLVMX86AsmParser) + endif() endif() #Mac needed variables (adapt for your needs - http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH) diff --git a/src/main.cpp b/src/main.cpp index 02ec210..0452578 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,7 +39,7 @@ #include #include "iss/arch/tgc_mapper.h" #ifdef WITH_LLVM -#include +#include #endif #include #include "iss/plugin/cycle_estimate.h"