configuration changes to reduce binary size

This commit is contained in:
Fabian Kaczmarczyck
2021-06-18 14:52:03 +02:00
committed by kaczmarczyck
parent c7750a4e8c
commit 9ca17b17e1
2 changed files with 5 additions and 0 deletions

View File

@@ -44,3 +44,4 @@ lto = true # Link Time Optimization usually reduces size of binaries and static
panic = "abort" panic = "abort"
lto = true # Link Time Optimization usually reduces size of binaries and static libraries lto = true # Link Time Optimization usually reduces size of binaries and static libraries
opt-level = "z" opt-level = "z"
codegen-units = 1

View File

@@ -372,6 +372,10 @@ class OpenSKInstaller:
"-D", "-D",
"warnings", "warnings",
"--remap-path-prefix={}=".format(os.getcwd()), "--remap-path-prefix={}=".format(os.getcwd()),
"-C",
"link-arg=-icf=all",
"-C",
"force-frame-pointers=no",
] ]
env = os.environ.copy() env = os.environ.copy()
env["RUSTFLAGS"] = " ".join(rust_flags) env["RUSTFLAGS"] = " ".join(rust_flags)