Skip to content

Commit 5ace057

Browse files
committed
Add link about atomics
1 parent d32abf0 commit 5ace057

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/custom-target.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ You can pretty much copy that output into your file. Start with a few modificati
5454
`"panic-strategy": "abort"`. If you decide not to `abort` on panicking, unless you [tell Cargo
5555
to][eh_personality], you must define an [eh_personality] function.
5656
- Configure atomics. Pick the first option that describes your target:
57-
- I have a single-core processor, no threads, **no interrupts**, or any way for multiple things to
58-
be happening in parallel: if you are **sure** that is the case, such as WASM (for now), you may
59-
set `"singlethread": true`. This will configure LLVM to convert all atomic operations to use
60-
their single threaded counterparts.
57+
- I have a single-core processor, no threads, [**no interrupts**][interrupts-note], or any way for
58+
multiple things to be happening in parallel: if you are **sure** that is the case, such as WASM
59+
(for now), you may set `"singlethread": true`. This will configure LLVM to convert all atomic
60+
operations to use their single threaded counterparts.
6161
- I have native atomic operations: set `max-atomic-width` to the biggest type in bits that your
6262
target can operate on atomically. For example, many ARM cores have 32-bit atomic operations. You
6363
may set `"max-atomic-width": 32` in that case.
@@ -108,6 +108,7 @@ You can pretty much copy that output into your file. Start with a few modificati
108108
https://doc.rust-lang.org/edition-guide/rust-2018/error-handling-and-panics/aborting-on-panic.html
109109
[built-in-target]: ./compiler-support.md#built-in-target
110110
[eh_personality]: ./smallest-no-std.md#eh_personality
111+
[interrupts-note]: https://github.com/rust-lang/rust/issues/58500#issuecomment-654341233
111112
[libcalls-atomic]: http://llvm.org/docs/Atomics.html#libcalls-atomic
112113
[libcalls-sync]: http://llvm.org/docs/Atomics.html#libcalls-sync
113114
[gcc-sync]: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html

0 commit comments

Comments
 (0)