From 434385124ede2845133b2e3055327d05b55bc46c Mon Sep 17 00:00:00 2001 From: Hyeon Kim Date: Mon, 27 Jul 2020 20:59:13 +0900 Subject: [PATCH] Use `cargo build` instead of `cargo xbuild` Reference: https://github.com/rust-lang/cargo/pull/8393 --- Makefile | 2 +- rust/.cargo/config | 6 +++--- rust/README.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index be4bdfe..401be8f 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ clean: # $(src)/rust/target/x86_64-linux-kernel/release/libflashbench.a: $(src)/rust/Cargo.toml $(wildcard $(src)/rust/src/*.rs) cd $(src)/rust &&\ - env -u MAKE -u MAKEFLAGS cargo +nightly xbuild --release + env -u MAKE -u MAKEFLAGS cargo +nightly build --release %.rust.o: rust/target/x86_64-linux-kernel/release/lib%.a $(LD) -r -o $@ --whole-archive $< diff --git a/rust/.cargo/config b/rust/.cargo/config index 0d71863..ccd710c 100644 --- a/rust/.cargo/config +++ b/rust/.cargo/config @@ -1,5 +1,5 @@ -[alias] -xbuild = "build -Z build-std=core" - [build] target = "x86_64-linux-kernel" + +[unstable] +build-std = ["core"] diff --git a/rust/README.md b/rust/README.md index 516496b..8ea2900 100644 --- a/rust/README.md +++ b/rust/README.md @@ -2,11 +2,11 @@ Rust part of flashbench ======== ```bash -# Use nightly as default toolchain in this directory -rustup override set nightly +cargo +nightly build -# xbuild is alias of `build -Z build-std=core` -cargo xbuild +# You can set nightly as default rust toolchain in this project using rustup +rustup override set nightly +cargo build ``` ### TODOs