|
1 |
| -[alias] |
2 |
| -b = "build" |
3 |
| -c = "check" |
4 |
| -d = "doc" |
5 |
| -t = "test" |
6 |
| -r = "run" |
7 |
| - |
8 | 1 | [build]
|
9 | 2 | incremental = true
|
10 |
| -# might be helpful but we don't enforce sccache installation atm |
11 |
| -# https://github.com/mozilla/sccache |
12 |
| -# rustc-wrapper = "sccache" |
13 |
| - |
14 |
| -# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e |
15 |
| -[target.x86_64-unknown-linux-gnu] |
16 |
| -# clang has been listed as prerequisite in the doc |
17 |
| -linker = "clang" |
18 |
| -# enable avx2 by default since it's avaiable on almost all x86_64 CPUs |
19 |
| -rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"] |
20 | 3 |
|
21 |
| -[target.x86_64-unknown-linux-musl] |
22 |
| -# clang has been listed as prerequisite in the doc |
23 |
| -linker = "clang" |
24 |
| -# enable avx2 by default since it's avaiable on almost all x86_64 CPUs |
25 |
| -rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"] |
| 4 | +# In all cases, pass --cfg=tokio_unstable for tokio console integration |
| 5 | +# See(https://github.com/ChainSafe/forest/pull/2245) |
| 6 | +# on x86_64-linux-*, most CPUs support the specified vector instructions, so use those |
26 | 7 |
|
27 |
| -[target.x86_64-apple-darwin] |
28 |
| -# zld might help here |
29 |
| -# brew install michaeleisel/zld/zld |
30 |
| -# "-Clink-arg=-fuse-ld=zld" |
31 |
| -# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e |
32 |
| -rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"] |
| 8 | +# Note, rustflags aren't additive, so we can't specify tokio_unstable in `build.rustflags` |
| 9 | +# So we use a `cfg(foo)` and `cfg(not(foo))` for our common flags. |
| 10 | +[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'] |
| 11 | +rustflags = ["--cfg=tokio_unstable", "-Ctarget-feature=+avx2,+fma"] |
33 | 12 |
|
34 |
| -[target.aarch64-apple-darwin] |
35 |
| -rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"] |
| 13 | +[target.'cfg(not(all(target_arch = "x86_64", target_os = "linux")))'] |
| 14 | +rustflags = ["--cfg=tokio_unstable"] |
36 | 15 |
|
37 | 16 | [net]
|
38 | 17 | git-fetch-with-cli = true
|
|
0 commit comments