From ccc765a2af99c54d35cdd810ffc263a8cd74781a Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 25 Jun 2017 10:03:01 +0100 Subject: [PATCH 1/4] fix flaky links to llvm git, and gettingstarted.rts --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b2b9c8e7a..8daa8fc70c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It is also available directly from the LLVM svn server: Or could be cloned from LLVM git repository: ```bash - git clone http://llvm.org/git/llvm.git llvm + git clone https://github.com/llvm-mirror/llvm.git llvm cd llvm git checkout --track -b release_32 remotes/origin/release_32 ``` @@ -44,7 +44,7 @@ LLVM build system to automatically recognize it and build it along with LLVM. Step 2: Configure and Build LLVM -------------------------------- -Configure and build your copy of LLVM (see **$LLVM_SRC_ROOT/GettingStarted.html** for more information). +Configure and build your copy of LLVM (see **https://github.com/llvm-mirror/llvm/blob/release_32/docs/GettingStarted.rst** for more information). Assuming you installed clang at **$LLVM_SRC_ROOT/tools/clang** then Clang will automatically be built with LLVM. Otherwise, run `make` in the Clang source From 31b9bfff6b32a17f7395a078b13f9bd2122b8d40 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 25 Jun 2017 10:39:25 +0100 Subject: [PATCH 2/4] incorporate marsohod's build instructions --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8daa8fc70c..2c4f062522 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,25 @@ SPIR generator/Clang is designed to be built as part of an LLVM build. SPIR generator/Clang is based on LLVM/Clang version 3.2. +__Quick version:__ + +```bash +mkdir spir +cd spir +git clone -b khronos/spirv-3.6.1 https://github.com/KhronosGroup/SPIRV-LLVM.git llvm +cd llvm/tools +git clone -b spirv-1.1 https://github.com/KhronosGroup/SPIR clang +cd ../.. +mkdir build +cd build +cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$PWD/done -DCMAKE_BUILD_TYPE=Release ../llvm +make -j 16 +make install +``` +(adapted from https://github.com/KhronosGroup/SPIR/issues/44 ) + +__Details:__ + The LLVM source code could be downloaded from . It is also available directly from the LLVM svn server: @@ -28,7 +47,7 @@ Or could be cloned from LLVM git repository: ``` Assuming that the LLVM source code is located at **$LLVM_SRC_ROOT**, then the clang -source code should be installed as: **$LLVM_SRC_ROOT/tools/clang**. +source code (meaning, this SPIR repo) should be installed as: **$LLVM_SRC_ROOT/tools/clang**. The directory is not required to be called clang, but doing so will allow the LLVM build system to automatically recognize it and build it along with LLVM. @@ -40,6 +59,14 @@ LLVM build system to automatically recognize it and build it along with LLVM. git checkout --track -b spir_12 remotes/origin/spir_12 ``` +_Branches_ + +The following branches are available: + +- `spirv-1.0`: SPIR-V 1.0 +- `spirv-1.1`: SPIR-V 1.1 +- `spir_12`: SPIR-V 1.2 (doesnt seem to build though?) + -------------------------------- Step 2: Configure and Build LLVM -------------------------------- From 4d1bf3cbb2c7437a6f5839033ffc275dbbe7cbb9 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 25 Jun 2017 10:41:32 +0100 Subject: [PATCH 3/4] tweak branch descriptions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c4f062522..28cb67b083 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ The following branches are available: - `spirv-1.0`: SPIR-V 1.0 - `spirv-1.1`: SPIR-V 1.1 -- `spir_12`: SPIR-V 1.2 (doesnt seem to build though?) +- `spir_12`: SPIR 1.2, ie NOT SPIR-V, eg see https://github.com/KhronosGroup/SPIR/issues/69#issuecomment-310892736 -------------------------------- Step 2: Configure and Build LLVM From cb87466a7b67538a6e50015091e1eb2197ea1a0d Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sun, 25 Jun 2017 11:08:59 +0100 Subject: [PATCH 4/4] update llvm link to new url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28cb67b083..7cae240d2c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It is also available directly from the LLVM svn server: Or could be cloned from LLVM git repository: ```bash - git clone https://github.com/llvm-mirror/llvm.git llvm + git clone https://git.llvm.org/git/llvm.git/ llvm cd llvm git checkout --track -b release_32 remotes/origin/release_32 ```