Skip to content

Commit

Permalink
[CI] Prepare release branch for LLVM 15 (#375)
Browse files Browse the repository at this point in the history
Signed-off-by: Haonan Yang <haonan.yang@intel.com>
  • Loading branch information
haonanya committed Aug 31, 2022
1 parent 5d903e3 commit c78c1f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-in-tree-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- cron: 0 0 * * 0

env:
LLVM_VERSION: 14
LLVM_VERSION: 15

jobs:
build_and_test_linux:
Expand All @@ -42,13 +42,13 @@ jobs:
uses: actions/checkout@v2
with:
repository: llvm/llvm-project
ref: release/14.x
ref: release/15.x
path: llvm-project
- name: Checkout the translator sources
uses: actions/checkout@v2
with:
repository: KhronosGroup/SPIRV-LLVM-Translator
ref: llvm_release_140
ref: llvm_release_150
path: llvm-project/SPIRV-LLVM-Translator
- name: Checkout opencl-clang sources
uses: actions/checkout@v2
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_definitions(-DUSE_PREBUILT_LLVM)

if(NOT PREFERRED_LLVM_VERSION)
set(PREFERRED_LLVM_VERSION "14.0.0")
set(PREFERRED_LLVM_VERSION "15.0.0")
endif(NOT PREFERRED_LLVM_VERSION)
message(STATUS "[OPENCL-CLANG] Looking for LLVM version ${PREFERRED_LLVM_VERSION}")
find_package(LLVM ${PREFERRED_LLVM_VERSION} REQUIRED)
Expand Down Expand Up @@ -85,13 +85,13 @@ set(TARGET_NAME ${COMMON_CLANG_LIBRARY_NAME}${BUILD_PLATFORM} )
if(NOT USE_PREBUILT_LLVM)

if(NOT LLVM_EXTERNAL_CLANG_SOURCE_DIR)
set(LLVM_BASE_REVISION release_14)
set(LLVM_BASE_REVISION release_15)
set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/tools/clang)
set(CLANG_BASE_REVISION release_14)
set(CLANG_BASE_REVISION release_15)
elseif(EXISTS "${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/CMakeLists.txt")
set(LLVM_BASE_REVISION release/14.x)
set(LLVM_BASE_REVISION release/15.x)
set(CLANG_SOURCE_DIR "${LLVM_EXTERNAL_CLANG_SOURCE_DIR}")
set(CLANG_BASE_REVISION release/14.x)
set(CLANG_BASE_REVISION release/15.x)
endif()
if(EXISTS ${CLANG_SOURCE_DIR})
message(STATUS "[OPENCL-CLANG] Using Clang source code direcotry: ${CLANG_SOURCE_DIR}")
Expand Down Expand Up @@ -126,8 +126,8 @@ if(NOT USE_PREBUILT_LLVM)
)
endif()

set(SPIRV_BASE_REVISION llvm_release_140)
set(TARGET_BRANCH "ocl-open-140")
set(SPIRV_BASE_REVISION llvm_release_150)
set(TARGET_BRANCH "ocl-open-150")
get_filename_component(LLVM_MONOREPO_DIR ${LLVM_SOURCE_DIR} DIRECTORY)
set(LLVM_PATCHES_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm
${CMAKE_CURRENT_SOURCE_DIR}/patches/clang)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,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 . -b release/14.x
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_140
git clone https://github.com/intel/opencl-clang.git -b ocl-open-140
git clone https://github.com/llvm/llvm-project.git . -b release/15.x
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_150
git clone https://github.com/intel/opencl-clang.git -b ocl-open-150
```

Then we need to create a build directory and run the build:
Expand Down Expand Up @@ -56,7 +56,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 -b ocl-open-140
git clone https://github.com/intel/opencl-clang.git -b ocl-open-150
mkdir build && cd build
cmake ../opencl-clang
make all -j`nproc`
Expand All @@ -66,7 +66,7 @@ make all -j`nproc`

##### Preferred LLVM version

By default, opencl-clang's cmake script is searching for LLVM 14.0.0. You can
By default, opencl-clang's cmake script is searching for LLVM 15.0.0. You can
override target version of LLVM by using the `PREFERRED_LLVM_VERSION` cmake
option:

Expand Down

0 comments on commit c78c1f8

Please sign in to comment.