Skip to content

Commit

Permalink
update version numbers for 180 branch (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenju-he authored Mar 26, 2024
1 parent ad248f4 commit 254dc03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <workspace>
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:
Expand Down Expand Up @@ -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 <workspace>
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`
Expand All @@ -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
Expand Down

0 comments on commit 254dc03

Please sign in to comment.