| ... | @@ -38,12 +38,13 @@ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \ |
... | @@ -38,12 +38,13 @@ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \ |
|
|
libxmu-dev libxi-dev libglu1-mesa-dev libfreeimage-dev libglfw3-dev
|
|
libxmu-dev libxi-dev libglu1-mesa-dev libfreeimage-dev libglfw3-dev
|
|
|
sudo apt install libffi-dev zlib1g-dev cmake
|
|
sudo apt install libffi-dev zlib1g-dev cmake
|
|
|
```
|
|
```
|
|
|
Clone the clang repository and build it with gcc:
|
|
Clone the "clang" repository and build it from sources with gcc:
|
|
|
```
|
|
```
|
|
|
git clone --depth=1 https://github.com/llvm/llvm-project.git
|
|
git clone --depth=1 https://github.com/llvm/llvm-project.git
|
|
|
cd llvm-project
|
|
cd llvm-project
|
|
|
mkdir build
|
|
mkdir build
|
|
|
cd build
|
|
cd build
|
|
|
|
|
|
|
cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release \
|
|
cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release \
|
|
|
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \
|
|
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \
|
|
|
-DLLVM_ENABLE_PROJECTS="clang;openmp" \
|
|
-DLLVM_ENABLE_PROJECTS="clang;openmp" \
|
| ... | @@ -76,7 +77,7 @@ cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release \ |
... | @@ -76,7 +77,7 @@ cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release \ |
|
|
2>&1 | tee cmake-clang-stage2.log
|
|
2>&1 | tee cmake-clang-stage2.log
|
|
|
make -j 8 install
|
|
make -j 8 install
|
|
|
```
|
|
```
|
|
|
In order to use the compiler, you must add these lines in your `~/.bashrc`:
|
|
In order to use the compiler, you must add these lines to your `~/.bashrc`:
|
|
|
```
|
|
```
|
|
|
export PATH=~/.local/clang-gpu/bin:$PATH
|
|
export PATH=~/.local/clang-gpu/bin:$PATH
|
|
|
export LD_LIBRARY_PATH=~/.local/clang-gpu/lib:$LD_LIBRARY_PATH
|
|
export LD_LIBRARY_PATH=~/.local/clang-gpu/lib:$LD_LIBRARY_PATH
|
| ... | |
... | |
| ... | | ... | |