Skip to content

Commit

Permalink
Adds noconfig feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Wu committed Apr 1, 2021
1 parent 3d551bb commit d7fa4c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[target.'cfg(not(target_arch = "wasm32"))']
[target.'cfg(any(not(target_arch = "wasm32"), feature = "noconfig"))']
rustflags = ["-C", "target-cpu=native"]

[net]
git-fetch-with-cli = true
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Build snarkOS
run: |
cargo build --all --release && strip target/release/snarkos
cargo build --all --release --features noconfig && strip target/release/snarkos
- id: get_version
uses: battila7/get-version-action@v2
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Build snarkOS
run: |
cargo build --all --release && strip target/release/snarkos
cargo build --all --release --features noconfig && strip target/release/snarkos
- id: get_version
uses: battila7/get-version-action@v2
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:

- name: Build snarkOS
run: |
cargo build --all --release
cargo build --all --release --features noconfig
- id: get_version
uses: battila7/get-version-action@v2
Expand Down
10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ rustc_version = "0.2"
version = "0.14"
optional = true

[features]
default = []
compile_capnp_schema = [ "capnpc" ]
# This feature flag is used to disable `target-cpu=native` in `.cargo/config`.
noconfig = []

[profile.release]
opt-level = 3
lto = "thin"
Expand All @@ -158,7 +164,3 @@ lto = "thin"
incremental = true
debug-assertions = true
debug = true

[features]
default = [ ]
compile_capnp_schema = [ "capnpc" ]

0 comments on commit d7fa4c1

Please sign in to comment.