From 330c51bccf636fc89bbe18c4fed96e1aedeb05ab Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 3 Aug 2023 23:56:27 +0200 Subject: [PATCH] Faster native-utils-migration build --- packages/backend/native-utils/Cargo.toml | 4 ++++ packages/backend/native-utils/package.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend/native-utils/Cargo.toml b/packages/backend/native-utils/Cargo.toml index 6f4dd9175..0d2718fd8 100644 --- a/packages/backend/native-utils/Cargo.toml +++ b/packages/backend/native-utils/Cargo.toml @@ -45,3 +45,7 @@ napi-build = "2.0.1" [profile.release] lto = true + +[profile.release-no-lto] +inherits = "release" +lto = false diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json index 2fcc12cd0..3a6bb75f6 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend/native-utils/package.json @@ -36,8 +36,8 @@ "artifacts": "napi artifacts", "build": "yarn build:napi && yarn build:migration", "build:napi": "napi build --features napi --platform --release ./built/", - "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp ./target/release/migration ./built/migration", - "build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml", + "build:migration": "cargo build --locked --profile release-no-lto -p migration && cp ./target/release-no-lto/migration ./built/migration", + "build:debug": "napi build --platform ./built/ && cargo build -p migration", "prepublishOnly": "napi prepublish -t npm", "test": "yarn cargo:test && yarn build:napi && ava", "universal": "napi universal",