Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explanation for building LLVM from source #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 19 additions & 1 deletion guide/src/guide/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,26 @@ GPU crates, to execute built PTX you only need CUDA 9+.
- LLVM 7.x (7.0 to 7.4), The codegen searches multiple places for LLVM:
- If `LLVM_CONFIG` is present, it will use that path as `llvm-config`.
- Or, if `llvm-config` is present as a binary, it will use that, assuming that `llvm-config --version` returns `7.x.x`.
- Finally, if neither are present or unusable, it will attempt to download and use prebuilt LLVM. This currently only
- If neither are present or unusable, it will attempt to download and use prebuilt LLVM. This currently only
works on Windows however.
- Finally, on some operating systems you might have to build LLVM from source if no prebuilt binaries are available and the package repositories do not support the 7.x versions. The build process depends on the exact operating system. The commands below demonstrate the process on Ubuntu 22.04 with LLVM 7.1:
```sh
# Download and unpack the source code, see https://releases.llvm.org/
wget https://releases.llvm.org/download.html#7.1.0

Choose a reason for hiding this comment

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

I think wget https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/llvm-7.1.0.src.tar.xz is better. This downloads the file, with the hashtag one would download the webpage

tar -xvf llvm-7.1.0.src.tar.xz

# Create a build directory inside the source directory
cd llvm-7.1.0.src
mkdir build
cd build

# Build from source
cmake ..
make

# Install
sudo make install
```

- The OptiX SDK if using the optix library (the pathtracer example uses it for denoising).

Expand Down