File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,26 @@ See [rust-lang/rust#35437][0].
11
11
12
12
## When and how to use this crate?
13
13
14
- If you are working with a target that doesn't have binary releases of std available via rustup (this
15
- probably means you are building the core crate yourself) and need compiler-rt intrinsics (i.e. you
16
- are probably getting linker errors when building an executable: `undefined reference to
17
- __ aeabi_memcpy`), you can use this crate to get those intrinsics and solve the linker errors. To do
18
- that, simply add this crate as a Cargo dependency (it doesn't matter where in the dependency graph
19
- this crate ends up, as long as it's there):
14
+ If you are working with a target that doesn't have binary releases of std
15
+ available via rustup (this probably means you are building the core crate
16
+ yourself) and need compiler-rt intrinsics (i.e. you are probably getting linker
17
+ errors when building an executable: ` undefined reference to __aeabi_memcpy ` ),
18
+ you can use this crate to get those intrinsics and solve the linker errors. To
19
+ do that, add this crate somewhere in the dependency graph of the crate you are
20
+ building:
20
21
21
22
``` toml
23
+ # Cargo.toml
22
24
[dependencies ]
23
25
compiler_builtins = { git = " https://github.com/rust-lang-nursery/compiler-builtins" }
24
26
```
25
27
28
+ ``` rust
29
+ extern crate compiler_builtins;
30
+
31
+ // ...
32
+ ```
33
+
26
34
If you still get an "undefined reference to $INTRINSIC" error after that change,
27
35
that means that we haven't ported ` $INTRINSIC ` to Rust yet! Please open [ an
28
36
issue] with the name of the intrinsic and the LLVM triple (e.g.
You can’t perform that action at this time.
0 commit comments