mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-20 18:31:29 +02:00
Learn some build optimisations from binstall (#416)
This commit is contained in:
parent
c7c9b30636
commit
cf80b8395f
11
.cargo/config
Normal file
11
.cargo/config
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[target.armv7-unknown-linux-gnueabihf]
|
||||||
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
|
|
||||||
|
[target.armv7-unknown-linux-musleabihf]
|
||||||
|
linker = "arm-linux-musleabihf-gcc"
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-gnu]
|
||||||
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-musl]
|
||||||
|
linker = "aarch64-linux-musl-gcc"
|
7
.github/workflows/release-cli.yml
vendored
7
.github/workflows/release-cli.yml
vendored
@ -218,6 +218,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
rustup toolchain install --profile minimal --no-self-update stable
|
rustup toolchain install --profile minimal --no-self-update stable
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Install cross
|
- name: Install cross
|
||||||
if: matrix.cross
|
if: matrix.cross
|
||||||
@ -225,10 +226,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tool: cross
|
tool: cross
|
||||||
|
|
||||||
- name: Install host target
|
|
||||||
if: "!matrix.cross"
|
|
||||||
run: rustup target add ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Build (cargo)
|
- name: Build (cargo)
|
||||||
if: "!matrix.cross"
|
if: "!matrix.cross"
|
||||||
run: cargo build --package watchexec-cli --release --locked --target ${{ matrix.target }}
|
run: cargo build --package watchexec-cli --release --locked --target ${{ matrix.target }}
|
||||||
@ -244,7 +241,7 @@ jobs:
|
|||||||
ext=""
|
ext=""
|
||||||
[[ "${{ matrix.name }}" == windows-* ]] && ext=".exe"
|
[[ "${{ matrix.name }}" == windows-* ]] && ext=".exe"
|
||||||
bin="target/${{ matrix.target }}/release/watchexec${ext}"
|
bin="target/${{ matrix.target }}/release/watchexec${ext}"
|
||||||
objcopy --compress-debug-sections "$bin" || strip "$bin" || true
|
objcopy --compress-debug-sections "$bin" || true
|
||||||
|
|
||||||
mkdir "$dst"
|
mkdir "$dst"
|
||||||
|
|
||||||
|
19
Cargo.toml
19
Cargo.toml
@ -11,6 +11,23 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
lto = true
|
||||||
debug = 1 # for stack traces
|
debug = 1 # for stack traces
|
||||||
lto = "fat"
|
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
strip = "symbols"
|
||||||
|
|
||||||
|
[profile.dev.build-override]
|
||||||
|
opt-level = 0
|
||||||
|
codegen-units = 1024
|
||||||
|
debug = false
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
incremental = false
|
||||||
|
|
||||||
|
[profile.release.build-override]
|
||||||
|
opt-level = 0
|
||||||
|
codegen-units = 1024
|
||||||
|
debug = false
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
incremental = false
|
||||||
|
Loading…
Reference in New Issue
Block a user