Skip to content

Commit

Permalink
Remove "Skipping LLVM build" section
Browse files Browse the repository at this point in the history
`download-ci-llvm` is available and enabled by default for all tier 1
platforms, so there is no need to change it. Using system LLVM over CI
llvm is still supported, but is not recommended. Building LLVM from
source is still supported.

This also notes that you need to explicitly disable downloading LLVM
when updating the submodule.
  • Loading branch information
jyn514 authored and Joshua Nelson committed Jan 20, 2021
1 parent bee2fd5 commit 4e48f42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 34 deletions.
9 changes: 9 additions & 0 deletions src/backend/updating-llvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ through each in detail.
LLVM bindings. Note that you should use `#ifdef` and such to ensure that the
bindings still compile on older LLVM versions.

Note that `profile = "compiler"` and other defaults set by `x.py setup`
download LLVM from CI instead of building it from source. You should
disable this temporarily to make sure your changes are being used, by setting
```toml
[llvm]
download-ci-llvm = false
```
in config.toml

4. Test for regressions across other platforms. LLVM often has at least one bug
for non-tier-1 architectures, so it's good to do some more testing before
sending this to bors! If you're low on resources you can send the PR as-is
Expand Down
34 changes: 0 additions & 34 deletions src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,37 +201,3 @@ git worktree add -b my-feature ../rust2 master

You can then use that rust2 folder as a separate workspace for modifying
and building `rustc`!

## Skipping LLVM Build

By default, LLVM is built from source, and that takes significant amount of
time. One way to avoid that is to add this to `config.toml`:

```toml
[llvm]
download-ci-llvm = true
```

Downloading LLVM from CI is still experimental though, and might not be
available on all platforms. Otherwise, we'd make it a default!

Another alternative is to use LLVM already installed on your computer. This is
specified in the `target` section of `config.toml`:

```toml
[target.x86_64-unknown-linux-gnu]
llvm-config = "/path/to/llvm/llvm-7.0.1/bin/llvm-config"
```

We have observed the following paths before, which may be different from your system:

- `/usr/bin/llvm-config-8`
- `/usr/lib/llvm-8/bin/llvm-config`

Note that you need to have the LLVM `FileCheck` tool installed, which is used
for codegen tests. This tool is normally built with LLVM, but if you use your
own preinstalled LLVM, you will need to provide `FileCheck` in some other way.
On Debian-based systems, you can install the `llvm-N-tools` package (where `N`
is the LLVM version number, e.g. `llvm-8-tools`). Alternately, you can specify
the path to `FileCheck` with the `llvm-filecheck` config item in `config.toml`
or you can disable codegen test with the `codegen-tests` item in `config.toml`.

0 comments on commit 4e48f42

Please sign in to comment.