perf: remove lto setting from CLI (#6861)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Jonas Kruckenberg
2023-08-14 12:28:11 +02:00
committed by GitHub
parent d928d23cdb
commit 02eb08bbd7
3 changed files with 12 additions and 7 deletions

View File

@@ -61,13 +61,13 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}
args: --manifest-path ./tooling/cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }}
- name: Upload CLI
uses: actions/upload-artifact@v3
with:
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
path: tooling/cli/target/release/cargo-tauri${{ matrix.config.ext }}
path: tooling/cli/target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
if-no-files-found: error
upload:

View File

@@ -102,9 +102,6 @@ cc = "1"
[target."cfg(unix)".dependencies]
libc = "0.2"
[profile.release]
lto = true
[features]
default = [ "rustls" ]
native-tls = [
@@ -118,3 +115,10 @@ native-tls-vendored = [
"tauri-mobile/openssl-vendored"
]
rustls = [ "tauri-bundler/rustls", "tauri-mobile/rustls", "ureq/tls" ]
[profile.release-size-optimized]
inherits = "release"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"

View File

@@ -58,7 +58,7 @@
},
"scripts": {
"artifacts": "napi artifacts",
"build:release": "cross-env TARGET=node napi build --platform --release",
"build:release": "cross-env TARGET=node napi build --platform --profile release-size-optimized",
"build": "cross-env TARGET=node napi build --platform",
"prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
"prepack": "cp ../schema.json .",
@@ -67,5 +67,6 @@
"tauri": "node ./tauri.js",
"format": "prettier --write ./package.json ./tauri.js",
"format:check": "prettier --check ./package.json ./tauri.js"
}
},
"dependencies": {}
}