Learn some build optimisations from binstall (#416)
This commit is contained in:
parent
c7c9b30636
commit
cf80b8395f
|
@ -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"
|
|
@ -218,6 +218,7 @@ jobs:
|
|||
run: |
|
||||
rustup toolchain install --profile minimal --no-self-update stable
|
||||
rustup default stable
|
||||
rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: Install cross
|
||||
if: matrix.cross
|
||||
|
@ -225,10 +226,6 @@ jobs:
|
|||
with:
|
||||
tool: cross
|
||||
|
||||
- name: Install host target
|
||||
if: "!matrix.cross"
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: Build (cargo)
|
||||
if: "!matrix.cross"
|
||||
run: cargo build --package watchexec-cli --release --locked --target ${{ matrix.target }}
|
||||
|
@ -244,7 +241,7 @@ jobs:
|
|||
ext=""
|
||||
[[ "${{ matrix.name }}" == windows-* ]] && ext=".exe"
|
||||
bin="target/${{ matrix.target }}/release/watchexec${ext}"
|
||||
objcopy --compress-debug-sections "$bin" || strip "$bin" || true
|
||||
objcopy --compress-debug-sections "$bin" || true
|
||||
|
||||
mkdir "$dst"
|
||||
|
||||
|
|
19
Cargo.toml
19
Cargo.toml
|
@ -11,6 +11,23 @@ members = [
|
|||
]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
debug = 1 # for stack traces
|
||||
lto = "fat"
|
||||
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