From 9614044a8a99130ac7da16d39dd77fd0defcef56 Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Thu, 16 May 2024 09:09:41 -0400 Subject: [PATCH] think2 --- Cargo.toml | 6 ++++++ py/setup.py | 2 +- scripts/docker-manylinux.sh | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ce16f1bbb4d..1ba97fd1b4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,12 @@ debug = false # panic and error stack traces to Sentry. debug = true +[profile.release-cabi] +inherits = "release" +lto = true +debug = true +strip = true + [workspace.lints.clippy] dbg_macro = "warn" diff --git a/py/setup.py b/py/setup.py index ecda8bec19f..f12f60096de 100644 --- a/py/setup.py +++ b/py/setup.py @@ -48,7 +48,7 @@ def run(self): def build_native(spec): cmd = ["cargo", "build", "-p", "relay-cabi"] if not DEBUG_BUILD: - cmd.append("--release") + cmd.extend(("--profile", "release-cabi")) target = "release" else: target = "debug" diff --git a/scripts/docker-manylinux.sh b/scripts/docker-manylinux.sh index 7294b5885b1..dfe3247d1d7 100755 --- a/scripts/docker-manylinux.sh +++ b/scripts/docker-manylinux.sh @@ -25,7 +25,7 @@ docker run \ -e $TARGET_LINKER \ -e CARGO_BUILD_TARGET \ ${BUILDER_NAME} \ - bash -c 'cargo build -p relay-cabi --release' + bash -c 'cargo build -p relay-cabi --profile release-cabi' # create a wheel for the correct architecture docker run \