Skip to content

Commit 33dc132

Browse files
authored
Auto merge of #113 - japaric:readme-up, r=alexcrichton
mention that 'extern crate compiler_builtins' must be used in some crate that's part of the dependency graph of the crate one's building. r? @alexcrichton
2 parents 77ff499 + 39b7fa2 commit 33dc132

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,26 @@ See [rust-lang/rust#35437][0].
1111

1212
## When and how to use this crate?
1313

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:
2021

2122
``` toml
23+
# Cargo.toml
2224
[dependencies]
2325
compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins" }
2426
```
2527

28+
``` rust
29+
extern crate compiler_builtins;
30+
31+
// ...
32+
```
33+
2634
If you still get an "undefined reference to $INTRINSIC" error after that change,
2735
that means that we haven't ported `$INTRINSIC` to Rust yet! Please open [an
2836
issue] with the name of the intrinsic and the LLVM triple (e.g.

0 commit comments

Comments
 (0)