From 9ca17b17e195a0faa1f5ebc07649215777595f03 Mon Sep 17 00:00:00 2001 From: Fabian Kaczmarczyck Date: Fri, 18 Jun 2021 14:52:03 +0200 Subject: [PATCH] configuration changes to reduce binary size --- Cargo.toml | 1 + deploy.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 34ae47a..0135172 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,3 +44,4 @@ lto = true # Link Time Optimization usually reduces size of binaries and static panic = "abort" lto = true # Link Time Optimization usually reduces size of binaries and static libraries opt-level = "z" +codegen-units = 1 diff --git a/deploy.py b/deploy.py index 78ddfe1..398c1da 100755 --- a/deploy.py +++ b/deploy.py @@ -372,6 +372,10 @@ class OpenSKInstaller: "-D", "warnings", "--remap-path-prefix={}=".format(os.getcwd()), + "-C", + "link-arg=-icf=all", + "-C", + "force-frame-pointers=no", ] env = os.environ.copy() env["RUSTFLAGS"] = " ".join(rust_flags)