Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ os:

# Use Ubuntu 16.04 LTS (Xenial) as the Linux testing environment.
dist: xenial
sudo: false

git:
depth: 1
Expand Down Expand Up @@ -33,16 +32,19 @@ addons:
- libclang-8-dev

install:
- export TAG=v8.0.1-3
- export TARBALL=SPIRV-LLVM-Translator-${TAG}-linux-${BUILD_TYPE}.zip
- wget https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/download/${TAG}/${TARBALL} -O /tmp/${TARBALL}
- unzip /tmp/${TARBALL} -d spirv-llvm-translator
- git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_80 spirv-llvm-translator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this would be enough

Basically, we are not triggering build of the translator here.

If I understand correctly, we have to git clone the whole llvm, put both the translator and opencl-clang in there, and only then perform in-tree build
Or, we need to build the translator first as separate cmake invocation and then supply it into opencl-clang build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I've updated it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, you don't have to build llvm. It will take a lot of time, probably travis job will time out.
I think we should build translator as a separate step in cmake. This build should use llvm binaries from deb packages as it is done now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Updated.

- cd spirv-llvm-translator
- for patch in `ls ../patches/spirv/*.patch`; do echo $patch; git apply $patch; done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fail the build if we couldn't apply a patch? Probably set -e can help with it,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. The build can pass without these patches.
Is it possible to merge this patches to spirv translator, instead of keeping it here and applying it?

I'll merge this pull request firstly. If needed, I'll add "set -e" to stop build if patch cannot be applied.

Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to merge this patches to spirv translator, instead of keeping it here and applying it?

It depends on patches from patches/clang directory. Patches for spirv translator will not work without patches to clang.

- mkdir build && cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- make -j`nproc` && make install
- cd ../../

compiler:
- gcc
- clang

script:
- mkdir build && cd build
- 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 ..
- make install
- 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 ../
- make -j`nproc`