File tree 1 file changed +30
-0
lines changed
src/doc/unstable-book/src/language-features
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,33 @@ The presence of this feature changes the way the linkage format for dylibs is ca
12
12
that is necessary for linking against dylibs that statically link ` std ` (such as ` rustc_driver ` ).
13
13
This makes this feature "viral" in linkage; its use in a given crate makes its use required in
14
14
dependent crates which link to it (including integration tests, which are built as separate crates).
15
+
16
+ ## Common linker failures related to missing LLVM libraries
17
+
18
+ ### When using ` rustc-private ` with Official Toolchains
19
+
20
+ When using the ` rustc_private ` feature with official toolchains distributed via rustup, you'll need to install:
21
+
22
+ 1 . The ` rustc-dev ` component (provides compiler libraries)
23
+ 2 . The ` llvm-tools ` component (provides LLVM libraries needed for linking)
24
+
25
+ You can install these components using ` rustup ` :
26
+
27
+ ```
28
+ rustup component add rustc-dev llvm-tools
29
+ ```
30
+
31
+ Without the ` llvm-tools ` component, you may encounter linking errors like:
32
+
33
+ ```
34
+ error: linking with `cc` failed: exit status: 1
35
+ |
36
+ = note: rust-lld: error: unable to find library -lLLVM-{version}
37
+ ```
38
+
39
+ ### When using ` rustc-private ` with Custom Toolchains
40
+
41
+ For custom-built toolchains or environments not using rustup, different configuration may be required:
42
+
43
+ - Ensure LLVM libraries are available in your library search paths
44
+ - You might need to configure library paths explicitly depending on your LLVM installation
You can’t perform that action at this time.
0 commit comments