Merge pull request #14 from rphmeier/uint-asm-with-feature

Uint ASM only with feature
This commit is contained in:
Marek Kotewicz 2018-02-01 13:45:19 +01:00 committed by GitHub
commit 97b2fbc532
3 changed files with 4 additions and 20 deletions

View File

@ -11,3 +11,6 @@ crunchy = "0.1.5"
ethereum-types = { path ="../ethereum-types", features = ["std", "heapsizeof"] }
quickcheck = "0.6"
uint = { path = "../uint" }
[features]
use_asm = ["uint/use_asm", "ethereum-types/use_asm"]

View File

@ -1,17 +0,0 @@
// Copyright 2015-2017 Parity Technologies
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern crate rustc_version;
use rustc_version::{version_meta, Channel};
fn main() {
if let Channel::Nightly = version_meta().unwrap().channel {
println!("cargo:rustc-cfg=asm_available");
}
}

View File

@ -1,5 +1,3 @@
#![cfg_attr(asm_available, feature(asm))]
extern crate core;
#[cfg(test)]
#[macro_use]
@ -13,4 +11,4 @@ extern crate crunchy;
extern crate quickcheck;
#[cfg(test)]
pub mod uint_tests;
pub mod uint_tests;