Adds a noconfig feature for release builds

This commit is contained in:
Howard Wu 2021-03-31 22:14:03 -07:00
parent 19e3bfc253
commit 2aabb09468
3 changed files with 7 additions and 5 deletions

View File

@ -1,2 +1,2 @@
[target.'cfg(not(target_arch = "wasm32"))']
[target.'cfg(any(not(target_arch = "wasm32"), feature = "release"))']
rustflags = ["-C", "target-cpu=native"]

View File

@ -25,7 +25,7 @@ jobs:
- name: Build Leo
run: |
cargo build --all --release && strip target/release/leo
cargo build --all --release --features noconfig && strip target/release/leo
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
@ -67,7 +67,7 @@ jobs:
- name: Build Leo
run: |
cargo build --all --release && strip target/release/leo
cargo build --all --release --features noconfig && strip target/release/leo
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
@ -118,7 +118,7 @@ jobs:
- name: Build Leo
run: |
cargo build --all --release
cargo build --all --release --features noconfig
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true

View File

@ -155,8 +155,10 @@ version = "0.5"
version = "0.11.2"
[features]
default = [ ]
default = []
ci_skip = [ "leo-compiler/ci_skip" ]
# This feature flag is used to disable `target-cpu=native` in `.cargo/config`.
noconfig = []
[profile.release]
opt-level = 3