diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cbdd40330..b585de9c5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,29 +77,9 @@ if(ENABLE_OC AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32) list(APPEND EOSIO_WASM_RUNTIMES eos-vm-oc) # EOS VM OC requires LLVM, but move the check up here to a central location so that the EosioTester.cmakes # can be created with the exact version found - # find_package VERSION range is only available in 3.19 and newer. - if(${CMAKE_VERSION} VERSION_LESS "3.19") - find_package(LLVM REQUIRED CONFIG) - else() - # Preferring the latest LLVM version, search through major 11..7 and minor 9..0 in reverse order. - # Minor versions may break API. This manifests in the LLVM config files such that a range of `11...<12` - # will NOT find LLVM `11.1`. We loop over minor as well as major to resolve this. - set(max_minor 9) - set(major 11) - set(minor ${max_minor}) - while(NOT LLVM_FOUND AND major GREATER_EQUAL 7) - math(EXPR end "${major} + 1") - find_package(LLVM ${major}.${minor}...<${end} CONFIG QUIET) - if(minor GREATER 0) - math(EXPR minor "${minor} - 1") - else() - math(EXPR major "${major} - 1") - set(minor ${max_minor}) - endif() - endwhile() - endif() + find_package(LLVM REQUIRED CONFIG) if(LLVM_VERSION_MAJOR VERSION_LESS 7 OR LLVM_VERSION_MAJOR VERSION_GREATER_EQUAL 12) - message(FATAL_ERROR "Leap requires an LLVM version 7 through 11") + message(FATAL_ERROR "Leap requires an LLVM version 7 through 11") endif() endif() endif() diff --git a/README.md b/README.md index 660155da8f..436cc0b7c6 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,9 @@ To build, make sure you are in the root of the `leap` repo, then run the followi ```bash mkdir -p build cd build -cmake -DCMAKE_BUILD_TYPE=Release .. +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-11 .. make -j "$(nproc)" package ``` - -If CMake fails to find a valid llvm configure file, it may be necessary to add `-DCMAKE_PREFIX_PATH=/usr/lib/llvm-11` to the cmake command.
Ubuntu 18.04 Bionic