Skip to content

Commit ce71e70

Browse files
committed
Try link plugin lto
1 parent c643efb commit ce71e70

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

.cargo/config.toml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,62 @@
11
[target.x86_64-pc-windows-msvc]
22
rustflags = ["-C", "link-args=/NODEFAULTLIB:libcmt.lib"]
33

4+
[target.x86_64-apple-darwin]
5+
rustflags = [
6+
"-C",
7+
"linker-plugin-lto",
8+
"-C",
9+
"linker=clang",
10+
]
11+
12+
[target.x86_64-unknown-linux-gnu]
13+
rustflags = [
14+
"-C",
15+
"linker-plugin-lto",
16+
"-C",
17+
"linker=clang",
18+
]
19+
420
[target.aarch64-apple-darwin]
5-
rustflags = ["-C", "target-cpu=apple-a14"]
21+
rustflags = [
22+
"-C",
23+
"target-cpu=apple-a14",
24+
"-C",
25+
"linker-plugin-lto",
26+
"-C",
27+
"linker=clang",
28+
]
629

730
[target.aarch64-unknown-linux-gnu]
831
linker = "aarch64-linux-gnu-gcc"
9-
rustflags = ["-C", "target-cpu=cortex-a57"]
32+
rustflags = [
33+
"-C",
34+
"target-cpu=cortex-a57",
35+
"-C",
36+
"linker-plugin-lto",
37+
"-C",
38+
"linker=clang",
39+
]
1040

1141
[target.armv7-unknown-linux-gnueabihf]
1242
linker = "arm-linux-gnueabihf-gcc"
13-
rustflags = ["-C", "target-cpu=cortex-a7"]
43+
rustflags = [
44+
"-C",
45+
"target-cpu=cortex-a7",
46+
"-C",
47+
"linker-plugin-lto",
48+
"-C",
49+
"linker=clang",
50+
]
1451

1552
[target.x86_64-unknown-linux-musl]
1653
rustflags = [
1754
"-C",
1855
"target-feature=-crt-static",
56+
"-C",
57+
"linker-plugin-lto",
58+
"-C",
59+
"linker=clang",
1960
]
2061

2162
[target.aarch64-unknown-linux-musl]
@@ -25,4 +66,8 @@ rustflags = [
2566
"target-feature=-crt-static",
2667
"-C",
2768
"target-cpu=cortex-a57",
69+
"-C",
70+
"linker-plugin-lto",
71+
"-C",
72+
"linker=clang",
2873
]

0 commit comments

Comments
 (0)