mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +00:00
Try using different linker
This commit is contained in:
parent
96c82535a4
commit
305144cf87
2 changed files with 18 additions and 0 deletions
16
.cargo/config.toml
Normal file
16
.cargo/config.toml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Statically link the vcruntime
|
||||||
|
# https://users.rust-lang.org/t/static-vcruntime-distribute-windows-msvc-binaries-without-needing-to-deploy-vcruntime-dll/57599
|
||||||
|
[target.'cfg(all(windows, target_env = "msvc"))']
|
||||||
|
rustflags = [
|
||||||
|
"-C",
|
||||||
|
"link-args=/DEFAULTLIB:ucrt.lib /DEFAULTLIB:libvcruntime.lib libcmt.lib",
|
||||||
|
"-C",
|
||||||
|
"link-args=/NODEFAULTLIB:libvcruntimed.lib /NODEFAULTLIB:vcruntime.lib /NODEFAULTLIB:vcruntimed.lib",
|
||||||
|
"-C",
|
||||||
|
"link-args=/NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib",
|
||||||
|
"-C",
|
||||||
|
"link-args=/NODEFAULTLIB:libucrt.lib /NODEFAULTLIB:libucrtd.lib /NODEFAULTLIB:ucrtd.lib",
|
||||||
|
]
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-gnu]
|
||||||
|
linker = "aarch64-linux-gnu-gcc"
|
|
@ -46,6 +46,7 @@ reqwest = { version = "0.11", default-features = false }
|
||||||
#
|
#
|
||||||
# 1. Optimize for size
|
# 1. Optimize for size
|
||||||
# 2. Automatically strip symbols from the binary
|
# 2. Automatically strip symbols from the binary
|
||||||
|
# 3. Enable link-time optimization
|
||||||
#
|
#
|
||||||
# Note that we could abort instead of panicking to cut down on size
|
# Note that we could abort instead of panicking to cut down on size
|
||||||
# even more, but because we use the filesystem & some other APIs we
|
# even more, but because we use the filesystem & some other APIs we
|
||||||
|
@ -54,3 +55,4 @@ reqwest = { version = "0.11", default-features = false }
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = "z"
|
opt-level = "z"
|
||||||
strip = true
|
strip = true
|
||||||
|
lto = true
|
||||||
|
|
Loading…
Reference in a new issue