mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-22 16:11:38 +03:00
add release_env with lto, codegen_units, strip
This commit is contained in:
parent
ca6db9d0bf
commit
1b26fc144e
@ -26,11 +26,15 @@ def build_and_move(feature, tmp_dir, architecture, os_name):
|
||||
print("=" * 50 + "\n")
|
||||
|
||||
zip_prefix = f"kinode-{architecture}-{os_name}"
|
||||
release_env = os.environ.copy()
|
||||
release_env["CARGO_PROFILE_RELEASE_LTO"] = f"fat"
|
||||
release_env["CARGO_PROFILE_RELEASE_CODEGEN_UNITS"] = f"1"
|
||||
release_env["CARGO_PROFILE_RELEASE_STRIP"] = f"symbols"
|
||||
if feature:
|
||||
subprocess.run(["cargo", "+nightly", "build", "--release", "--features", feature], check=True)
|
||||
subprocess.run(["cargo", "+nightly", "build", "--release", "--features", feature], check=True, env=release_env)
|
||||
zip_name = f"{zip_prefix}-{feature}.zip"
|
||||
else:
|
||||
subprocess.run(["cargo", "+nightly", "build", "--release"], check=True)
|
||||
subprocess.run(["cargo", "+nightly", "build", "--release"], check=True, env=release_env)
|
||||
zip_name = f"{zip_prefix}.zip"
|
||||
|
||||
# Move and rename the binary
|
||||
|
Loading…
Reference in New Issue
Block a user