Commit d1ca2c3a authored by Sergey Pepyakin's avatar Sergey Pepyakin Committed by asynchronous rob
Browse files

Build parachains (#207)

* Fix build of test-chains.

* Add test-chains into build and publish scripts
parent 521e3a23
......@@ -9,7 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
polkadot-parachain = { path = "../../", default-features = false }
wee_alloc = "0.2.0"
wee_alloc = "0.4.0"
tiny-keccak = "1.4"
pwasm-libc = "0.2"
......
......@@ -17,7 +17,7 @@
//! Basic parachain that adds a number as part of its state.
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc, core_intrinsics, global_allocator, lang_items))]
#![cfg_attr(not(feature = "std"), feature(alloc, core_intrinsics, global_allocator, lang_items, panic_implementation))]
#[cfg(not(feature = "std"))]
extern crate alloc;
......
......@@ -16,19 +16,23 @@
//! Defines WASM module logic.
use core::intrinsics;
use parachain::{self, ValidationResult};
use parachain::codec::Slicable;
use super::{HeadData, BlockData};
#[lang = "panic_fmt"]
#[panic_implementation]
#[no_mangle]
pub fn rust_begin_panic(_info: &::core::panic::PanicInfo) -> ! {
unsafe {
intrinsics::abort()
}
}
#[lang = "oom"]
#[no_mangle]
pub extern fn panic_fmt(
_args: ::core::fmt::Arguments,
_file: &'static str,
_line: u32,
_col: u32,
) -> ! {
use core::intrinsics;
pub fn oom() -> ! {
unsafe {
intrinsics::abort();
}
......
......@@ -7,8 +7,7 @@ do
i=${i%/}
cd $i
# TODO: stop using exact nightly when wee-alloc works on normal nightly.
RUSTFLAGS="-C link-arg=--import-memory" cargo +nightly-2018-03-07 build --target=wasm32-unknown-unknown --release --no-default-features
RUSTFLAGS="-C link-arg=--import-memory" cargo +nightly build --target=wasm32-unknown-unknown --release --no-default-features
wasm-gc target/wasm32-unknown-unknown/release/$i.wasm ../../tests/res/$i.wasm
cd ..
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment