Skip to content

Commit

Permalink
Remove -Zno-landing-pads flag, use -Cpanic=abort instead (#428)
Browse files Browse the repository at this point in the history
Fixes #427
  • Loading branch information
Wu Yu Wei authored May 6, 2020
1 parent 9d8f730 commit 083b395
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ script:
- |
if [ "$TRAVIS_RUST_VERSION" = "nightly" ] && [ -z "$TRAVIS_TAG" ]; then
export CARGO_INCREMENTAL=0;
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads";
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort";
export RUSTDOCFLAGS="-Cpanic=abort";
fi
- if [ "$TRAVIS_TAG" ]; then export CARGO_OPTIONS="--release"; fi
- cargo build --verbose $CARGO_OPTIONS
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ Pass `--coverage` to `clang` or `gcc` (or for older gcc versions pass `-ftest-co

```sh
export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
export RUSTDOCFLAGS="-Cpanic=abort"
```
These will ensure that things like dead code elimination do not skew the coverage.

Expand Down Expand Up @@ -158,7 +159,8 @@ matrix:

script:
- export CARGO_INCREMENTAL=0
- export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
- export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
- export RUSTDOCFLAGS="-Cpanic=abort"
- cargo build --verbose $CARGO_OPTIONS
- cargo test --verbose $CARGO_OPTIONS
- |
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ build_script:
- ps: |
If ($env:CHANNEL -eq "nightly" -And $env:APPVEYOR_REPO_TAG -eq "false") {
$env:CARGO_INCREMENTAL = "0"
$env:RUSTFLAGS = "-Zprofile -Ccodegen-units=1 -Ctarget-feature=+crt-static -Zno-landing-pads -Copt-level=0 -Clink-dead-code -Coverflow-checks=off"
$env:RUSTFLAGS = "-Zprofile -Ccodegen-units=1 -Ctarget-feature=+crt-static -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
$env:RUSTDOCFLAGS = "-Cpanic=abort"
}
- cargo build %CARGO_RELEASE_ARG% --locked --target %TARGET%
- 7z a grcov-win-%PLATFORM_TARGET%.tar .\target\%TARGET%\%BUILD_TYPE%\grcov.exe
Expand Down

0 comments on commit 083b395

Please sign in to comment.