Skip to content

Commit 38f969d

Browse files
committed
Keep opt profile
Based on the suggestion from archseer, the release build will use opt. The release profile will be separate for testing purposes.
1 parent ef07562 commit 38f969d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
run: ${{ env.CARGO }} test --release --locked --target ${{ matrix.target }} --workspace
149149

150150
- name: Build release binary
151-
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }}
151+
run: ${{ env.CARGO }} build --profile opt --locked --target ${{ matrix.target }}
152152

153153
- name: Build AppImage
154154
shell: bash
@@ -175,7 +175,7 @@ jobs:
175175
176176
mkdir -p "$APP.AppDir"/usr/{bin,lib/helix}
177177
178-
cp "target/${{ matrix.target }}/release/hx" "$APP.AppDir/usr/bin/hx"
178+
cp "target/${{ matrix.target }}/opt/hx" "$APP.AppDir/usr/bin/hx"
179179
rm -rf runtime/grammars/sources
180180
cp -r runtime "$APP.AppDir/usr/lib/helix/runtime"
181181
@@ -204,7 +204,7 @@ jobs:
204204
run: |
205205
cargo install cargo-deb
206206
mkdir -p target/release
207-
cp target/${{ matrix.target }}/release/hx target/release/
207+
cp target/${{ matrix.target }}/opt/hx target/release/
208208
cargo deb --no-build
209209
mkdir -p dist
210210
mv target/debian/*.deb dist/
@@ -214,9 +214,9 @@ jobs:
214214
run: |
215215
mkdir -p dist
216216
if [ "${{ matrix.os }}" = "windows-2019" ]; then
217-
cp "target/${{ matrix.target }}/release/hx.exe" "dist/"
217+
cp "target/${{ matrix.target }}/opt/hx.exe" "dist/"
218218
else
219-
cp "target/${{ matrix.target }}/release/hx" "dist/"
219+
cp "target/${{ matrix.target }}/opt/hx" "dist/"
220220
fi
221221
if [ -d runtime/grammars/sources ]; then
222222
rm -rf runtime/grammars/sources

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ default-members = [
2121
]
2222

2323
[profile.release]
24+
lto = "thin"
25+
26+
[profile.opt]
27+
inherits = "release"
2428
lto = "fat"
2529
codegen-units = 1
2630
strip = true

book/src/building-from-source.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ to package the runtime into `/usr/lib/helix/runtime`. The rough steps a build
118118
script could follow are:
119119

120120
1. `export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime`
121-
1. `cargo build --release --locked`
121+
1. `cargo build --profile opt --locked`
122122
1. `cp -r runtime $BUILD_DIR/usr/lib/helix/`
123123
1. `cp target/opt/hx $BUILD_DIR/usr/bin/hx`
124124

0 commit comments

Comments
 (0)