Use RUSTFLAGS to set the optimization level (#10719)

* Use RUSTFLAGS to set the optimization level

Cargo has a [quirk]() in how configuration settings are propagated when `cargo test` runs: local code respect the settings in `[profile.test]` but all dependencies use the `[profile.dev]` settings. Here we force `opt-level=3` for all dependencies.

* Remove unused profile settings

* Maybe like this?

* Turn off incremental compilation

* Remove colors; try again with overflow-checks on

* Use quiet CI machine

* Turn overflow checking back on

* Be explicit about what options we use

* Remove "quiet machine" override
This commit is contained in:
David 2019-06-07 11:25:45 +02:00 committed by GitHub
parent 9de1afeeb6
commit 7827cc048e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -117,10 +117,9 @@ path = "parity/lib.rs"
path = "parity/main.rs" path = "parity/main.rs"
name = "parity" name = "parity"
[profile.dev]
[profile.release] [profile.release]
debug = false debug = false
lto = true
[workspace] [workspace]
# This should only list projects that are not # This should only list projects that are not

View File

@ -14,4 +14,5 @@ rustup default $1
rustup show rustup show
echo "________Running Parity Full Test Suite________" echo "________Running Parity Full Test Suite________"
time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET --verbose --color=always -- --test-threads $THREADS # Why are we using RUSTFLAGS? See https://github.com/paritytech/parity-ethereum/pull/10719
CARGO_INCREMENTAL=0 RUSTFLAGS="-C opt-level=3 -C overflow-checks=on -C debuginfo=2" time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET --verbose --color=never -- --test-threads $THREADS