@@ -24,6 +24,34 @@ git add llvm_target
2424git commit -m 'Use my custom LLVM' 
2525``` 
2626
27+ ### Using pre-built LLVM  
28+ 
29+ If you have a local LLVM checkout that is already built, you may be
30+ able to configure Rust to treat your build as the [ system LLVM] [ sysllvm ] 
31+ to avoid redundant builds.
32+ 
33+ You can tell Rust to use a pre-built version of LLVM using the ` target `  section
34+ of ` config.toml ` :
35+ 
36+ ``` toml 
37+ [target .x86_64-unknown-linux-gnu ]
38+ llvm-config  = " /path/to/llvm/llvm-7.0.1/bin/llvm-config" 
39+ ``` 
40+ 
41+ If you are attempting to use a system LLVM, we have observed the following paths
42+ before, though they may be different from your system:
43+ 
44+ -  ` /usr/bin/llvm-config-8 ` 
45+ -  ` /usr/lib/llvm-8/bin/llvm-config ` 
46+ 
47+ Note that you need to have the LLVM ` FileCheck `  tool installed, which is used
48+ for codegen tests. This tool is normally built with LLVM, but if you use your
49+ own preinstalled LLVM, you will need to provide ` FileCheck `  in some other way.
50+ On Debian-based systems, you can install the ` llvm-N-tools `  package (where ` N ` 
51+ is the LLVM version number, e.g. ` llvm-8-tools ` ). Alternately, you can specify
52+ the path to ` FileCheck `  with the ` llvm-filecheck `  config item in ` config.toml ` 
53+ or you can disable codegen test with the ` codegen-tests `  item in ` config.toml ` .
54+ 
2755## Creating a target specification  
2856
2957You should start with a target JSON file. You can see the specification
0 commit comments