Skip to content

Commit

Permalink
Try link plugin lto
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Oct 21, 2021
1 parent c643efb commit ce71e70
Showing 1 changed file with 48 additions and 3 deletions.
51 changes: 48 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,62 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-args=/NODEFAULTLIB:libcmt.lib"]

[target.x86_64-apple-darwin]
rustflags = [
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.aarch64-apple-darwin]
rustflags = ["-C", "target-cpu=apple-a14"]
rustflags = [
"-C",
"target-cpu=apple-a14",
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-C", "target-cpu=cortex-a57"]
rustflags = [
"-C",
"target-cpu=cortex-a57",
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
rustflags = ["-C", "target-cpu=cortex-a7"]
rustflags = [
"-C",
"target-cpu=cortex-a7",
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.x86_64-unknown-linux-musl]
rustflags = [
"-C",
"target-feature=-crt-static",
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

[target.aarch64-unknown-linux-musl]
Expand All @@ -25,4 +66,8 @@ rustflags = [
"target-feature=-crt-static",
"-C",
"target-cpu=cortex-a57",
"-C",
"linker-plugin-lto",
"-C",
"linker=clang",
]

0 comments on commit ce71e70

Please sign in to comment.