diff --git a/ci_scripts/run_all.sh b/ci_scripts/run_all.sh index 5a320d139..ae79262f8 100755 --- a/ci_scripts/run_all.sh +++ b/ci_scripts/run_all.sh @@ -15,6 +15,7 @@ cargo build --release -p deltachat_ffi # Statically link against libdeltachat.a. export DCC_RS_DEV=$(pwd) +export DCC_RS_TARGET=release # Configure access to a base python and to several python interpreters # needed by tox below. diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py index bc4fb4cf7..cac032751 100755 --- a/python/install_python_bindings.py +++ b/python/install_python_bindings.py @@ -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)