From 254dc03f93693716e5eb9ee34ca42f8664d94285 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 26 Mar 2024 16:47:48 +0800 Subject: [PATCH] update version numbers for 180 branch (#506) --- CMakeLists.txt | 11 ++++++++--- README.md | 16 ++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 352ab76..a159ea8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required(VERSION 3.13.4) +if(NOT DEFINED BASE_LLVM_VERSION) + set(BASE_LLVM_VERSION 17) +endif(NOT DEFINED BASE_LLVM_VERSION) +set(OPENCL_CLANG_VERSION ${BASE_LLVM_VERSION}.0) + if(NOT DEFINED OPENCL_CLANG_BUILD_EXTERNAL) # check if we build inside llvm or not if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) @@ -152,9 +157,9 @@ if(NOT USE_PREBUILT_LLVM) ) endif() - set(CLANG_BASE_REVISION master) - set(SPIRV_BASE_REVISION master) - set(TARGET_BRANCH "ocl-open-110") + set(CLANG_BASE_REVISION release/18.x) + set(SPIRV_BASE_REVISION llvm_release_180) + set(TARGET_BRANCH "ocl-open-180") apply_patches(${CLANG_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/patches/clang diff --git a/README.md b/README.md index af30e94..bb2a89d 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ Before the build all dependencies must be downloaded and laid out as follows: This can be done using the following commands: ```bash cd -git clone https://github.com/llvm/llvm-project.git . -git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -git clone https://github.com/intel/opencl-clang.git +git clone https://github.com/llvm/llvm-project.git . -b release/18.x +git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_180 +git clone https://github.com/intel/opencl-clang.git -b ocl-open-180 ``` Then we need to create a build directory and run the build: @@ -60,7 +60,7 @@ documented in [Embedding LLVM in your project](https://llvm.org/docs/CMake.html# Commands to checkout sources and build: ```bash cd -git clone https://github.com/intel/opencl-clang.git +git clone https://github.com/intel/opencl-clang.git -b ocl-open-180 mkdir build && cd build cmake ../opencl-clang make all -j`nproc` @@ -70,13 +70,13 @@ make all -j`nproc` ##### Preferred LLVM version -By default, opencl-clang's cmake script is searching for LLVM which is built -based on the latest verion of current branch. You can override target version of -LLVM by using the `PREFERRED_LLVM_VERSION` cmake option: +By default, opencl-clang's cmake script is searching for LLVM 17. You can +override target version of LLVM by using the `PREFERRED_LLVM_VERSION` cmake +option: Example: ```bash -cmake -DPREFERRED_LLVM_VERSION="18" ../opencl-clang +cmake -DPREFERRED_LLVM_VERSION="17" ../opencl-clang ``` ##### Custom LLVM installation