diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..3eec48f --- /dev/null +++ b/.cargo/config @@ -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" diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index b03fd6b..d4c550a 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -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" diff --git a/Cargo.toml b/Cargo.toml index df69618..7ce9b4a 100644 --- a/Cargo.toml +++ b/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