Skip to content

Commit 0a1477a

Browse files
committed
Try link plugin lto
1 parent c643efb commit 0a1477a

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

.cargo/config.toml

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,74 @@
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+
"-C",
11+
"link-arg=-fuse-ld=lld",
12+
]
13+
14+
[target.x86_64-unknown-linux-gnu]
15+
rustflags = [
16+
"-C",
17+
"linker-plugin-lto",
18+
"-C",
19+
"linker=clang",
20+
"-C",
21+
"link-arg=-fuse-ld=lld",
22+
]
23+
424
[target.aarch64-apple-darwin]
5-
rustflags = ["-C", "target-cpu=apple-a14"]
25+
rustflags = [
26+
"-C",
27+
"target-cpu=apple-a14",
28+
"-C",
29+
"linker-plugin-lto",
30+
"-C",
31+
"linker=clang",
32+
"-C",
33+
"link-arg=-fuse-ld=lld",
34+
]
635

736
[target.aarch64-unknown-linux-gnu]
837
linker = "aarch64-linux-gnu-gcc"
9-
rustflags = ["-C", "target-cpu=cortex-a57"]
38+
rustflags = [
39+
"-C",
40+
"target-cpu=cortex-a57",
41+
"-C",
42+
"linker-plugin-lto",
43+
"-C",
44+
"linker=clang",
45+
"-C",
46+
"link-arg=-fuse-ld=lld",
47+
]
1048

1149
[target.armv7-unknown-linux-gnueabihf]
1250
linker = "arm-linux-gnueabihf-gcc"
13-
rustflags = ["-C", "target-cpu=cortex-a7"]
51+
rustflags = [
52+
"-C",
53+
"target-cpu=cortex-a7",
54+
"-C",
55+
"linker-plugin-lto",
56+
"-C",
57+
"linker=clang",
58+
"-C",
59+
"link-arg=-fuse-ld=lld",
60+
]
1461

1562
[target.x86_64-unknown-linux-musl]
1663
rustflags = [
1764
"-C",
1865
"target-feature=-crt-static",
66+
"-C",
67+
"linker-plugin-lto",
68+
"-C",
69+
"linker=clang",
70+
"-C",
71+
"link-arg=-fuse-ld=lld",
1972
]
2073

2174
[target.aarch64-unknown-linux-musl]
@@ -25,4 +78,10 @@ rustflags = [
2578
"target-feature=-crt-static",
2679
"-C",
2780
"target-cpu=cortex-a57",
81+
"-C",
82+
"linker-plugin-lto",
83+
"-C",
84+
"linker=clang",
85+
"-C",
86+
"link-arg=-fuse-ld=lld",
2887
]

0 commit comments

Comments
 (0)