try to do the release packaging with lto

and the default "python install_python_bindings.py" without it.
This commit is contained in:
holger krekel
2020-07-29 00:43:46 +02:00
parent 80a1884f00
commit 81fab2d783
2 changed files with 5 additions and 0 deletions

View File

@@ -17,8 +17,12 @@ if __name__ == "__main__":
os.environ["DCC_RS_DEV"] = dn
cmd = ["cargo", "build", "-p", "deltachat_ffi"]
if target == 'release':
extra = " -C lto=on -C embed-bitcode=yes"
os.environ["RUSTFLAGS"] = os.environ.get("RUSTFLAGS", "") + extra
cmd.append("--release")
print("running:", " ".join(cmd))
subprocess.check_call(cmd)
subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)