Skip to content

Commit 4378a44

Browse files
authored
Merge pull request #161 from fzou1/110-update
Update version number and branch names for ocl-open-110 branch
2 parents ea345a7 + c75ce5f commit 4378a44

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ git:
1212
branches:
1313
only:
1414
- master
15+
- ocl-open-110
1516

1617
env:
1718
global:
@@ -20,7 +21,7 @@ env:
2021
- BUILD_TYPE=Release
2122
- BUILD_TYPE=Debug
2223

23-
before_install:
24+
before-install:
2425
- curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
2526
- echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list
2627
- sudo apt-get update
@@ -31,14 +32,17 @@ before_install:
3132
libclang-cpp${LLVM_VERSION}-dev
3233

3334
install:
34-
- wget https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/download/dev-build/SPIRV-LLVM-Translator-dev-build-linux-Release.zip -O /tmp/SPIRV-LLVM-Translator-dev-build-linux-${BUILD_TYPE}.zip
35-
- unzip /tmp/SPIRV-LLVM-Translator-dev-build-linux-${BUILD_TYPE}.zip -d spirv-llvm-translator
35+
- git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git spirv-llvm-translator
36+
- mkdir spirv-llvm-translator/build && cd spirv-llvm-translator/build
37+
- cmake .. -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
38+
- make -j`nproc` && make install
39+
- cd ../../
3640

3741
compiler:
3842
- gcc
3943
- clang
4044

4145
script:
4246
- mkdir build && cd build
43-
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DLLVM_NO_DEAD_STRIP=ON -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF -DSPIRV_TRANSLATOR_DIR=./spirv-llvm-translator -DCMAKE_INSTALL_PREFIX=./install ..
47+
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DLLVM_NO_DEAD_STRIP=ON -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF -DSPIRV_TRANSLATOR_DIR=${TRAVIS_BUILD_DIR}/spirv-llvm-translator/build/install -DCMAKE_INSTALL_PREFIX=./install ..
4448
- make install

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ if(NOT USE_PREBUILT_LLVM)
8181

8282
if(NOT LLVM_EXTERNAL_CLANG_SOURCE_DIR)
8383
set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/tools/clang)
84+
set(CLANG_BASE_REVISION release_11)
8485
elseif(EXISTS "${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/CMakeLists.txt")
8586
set(CLANG_SOURCE_DIR "${LLVM_EXTERNAL_CLANG_SOURCE_DIR}")
87+
set(CLANG_BASE_REVISION release/11.x)
8688
endif()
8789
if(EXISTS ${CLANG_SOURCE_DIR})
8890
message(STATUS "Using Clang source code direcotry: ${CLANG_SOURCE_DIR}")
@@ -117,7 +119,8 @@ if(NOT USE_PREBUILT_LLVM)
117119
)
118120
endif()
119121

120-
set(CLANG_BASE_REVISION master)
122+
123+
# TODO: update after spirv translator branch for llvm 11 is created
121124
set(SPIRV_BASE_REVISION master)
122125
set(TARGET_BRANCH "ocl-open-110")
123126

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Before the build all dependencies must be downloaded and laid out as follows:
2525
This can be done using the following commands:
2626
```bash
2727
cd <workspace>
28-
git clone https://github.com/llvm/llvm-project.git .
29-
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
30-
git clone https://github.com/intel/opencl-clang.git
28+
git clone https://github.com/llvm/llvm-project.git . -b release/11.x
29+
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_110
30+
git clone https://github.com/intel/opencl-clang.git -b ocl-open-110
3131
```
3232

3333
Then we need to create a build directory and run the build:
@@ -58,7 +58,7 @@ documented in [Embedding LLVM in your project](https://llvm.org/docs/CMake.html#
5858
Commands to checkout sources and build:
5959
```bash
6060
cd <workspace>
61-
git clone https://github.com/intel/opencl-clang.git
61+
git clone https://github.com/intel/opencl-clang.git -b ocl-open-110
6262
mkdir build && cd build
6363
cmake ../opencl-clang
6464
make all -j`nproc`
@@ -68,13 +68,13 @@ make all -j`nproc`
6868

6969
##### Preferred LLVM version
7070

71-
By default, openclc-clang's cmake script is searching for LLVM 11.0.0. You can
71+
By default, opencl-clang's cmake script is searching for LLVM 11.0.0. You can
7272
override target version of LLVM by using the `PREFERRED_LLVM_VERSION` cmake
7373
option:
7474

7575
Example:
7676
```bash
77-
cmake -DPREFERRED_LLVM_VERSION="10.0.0" ../opencl-clang
77+
cmake -DPREFERRED_LLVM_VERSION="11.0.0" ../opencl-clang
7878
```
7979

8080
##### Custom LLVM installation

0 commit comments

Comments
 (0)