Skip to content

Commit

Permalink
fixup! refactor!: rollup-http-server based on libcmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmikhalevich committed Mar 28, 2024
1 parent f76e284 commit 5de846f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rollup-http/rollup-http-server/build-with-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ RISCV_ARCH="${RISCV_ARCH:-rv64gc}"
RISCV_ABI="${RISCV_ABI:-lp64d}"
CONTAINER_BASE="${CONTAINER_BASE:-/opt/cartesi/tools}"

docker run --rm -e USER=`id -u -n` -e GROUP=`id -g -n` -e UID=`id -u` -e GID=`id -g` -v `pwd`/../:$CONTAINER_BASE \
cargo clean

docker run --rm -e USER=`id -u -n` -e GROUP=`id -g -n` -e UID=`id -u` -e GID=`id -g` -v `pwd`/../../:$CONTAINER_BASE \
--env CC=riscv64-cartesi-linux-gnu-gcc --env CXX=riscv64-cartesi-linux-gnu-g++ --env CFLAGS="-march=$RISCV_ARCH -mabi=$RISCV_ABI" \
--env CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-cartesi-linux-gnu-gcc \
-w $CONTAINER_BASE/rollup-http-server $TOOLCHAIN_IMAGE:$TOOLCHAIN_TAG \
cargo build --target riscv64gc-unknown-linux-gnu --release
-w $CONTAINER_BASE $TOOLCHAIN_IMAGE:$TOOLCHAIN_TAG \
make -C sys-utils/libcmt install-mock PREFIX=$CONTAINER_BASE/libcmt && \
CPATH="$CONTAINER_BASE/libcmt/include" RUSTFLAGS="-L $CONTAINER_BASE/libcmt/lib" cargo build --target riscv64gc-unknown-linux-gnu --release

0 comments on commit 5de846f

Please sign in to comment.