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

Remove "Skipping LLVM build" section #1030

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions src/backend/updating-llvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,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`.
Comment on lines -218 to -237
Copy link
Member

@camelid camelid Jan 21, 2021

Choose a reason for hiding this comment

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

@jyn514 Was this supposed to be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, using system llvm is no longer recommended. There's a short section on it in config.toml.example, I don't think it needs its own section in the guide.