Fix compilation of python bindings in release mode

This commit is contained in:
Alexander Krotov
2020-12-25 07:54:40 +03:00
parent f98aa0d906
commit 4bc4aa0705

View File

@@ -19,8 +19,7 @@ if __name__ == "__main__":
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
os.environ["CARGO_PROFILE_RELEASE_LTO"] = "on"
cmd.append("--release")
print("running:", " ".join(cmd))