From 8ba1c9448e24011fee2e1738dc4910e4d3b00346 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Sat, 3 Apr 2021 18:24:00 +0100 Subject: [PATCH] remove need for cargo-xbuild --- .cargo/config.toml | 6 ++++++ Dockerfile | 3 +-- Makefile | 8 ++++---- README.md | 1 - 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..81b02eb0 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[unstable] +build-std = ["core", "compiler_builtins", "alloc"] +build-std-features = ["compiler-builtins-mem"] + +[build] +target = "gba.json" diff --git a/Dockerfile b/Dockerfile index 280f45f3..2a1973e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM devkitpro/devkitarm:20190212 +FROM docker.io/devkitpro/devkitarm:20190212 RUN apt-get update && \ apt-get install -y build-essential && \ @@ -6,7 +6,6 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly RUN . "$HOME/.cargo/env" && \ - cargo install cargo-xbuild && \ rustup component add rust-src RUN echo 'export PATH=$PATH:$DEVKITARM/bin' >> $HOME/.bashrc diff --git a/Makefile b/Makefile index 1145fe26..c4d4a727 100644 --- a/Makefile +++ b/Makefile @@ -30,18 +30,18 @@ r-%: out/release/%.gba cargo-release-%: $(RUSTFILES) out/crt0.o @OUTNAME=$(patsubst cargo-release-%,%, $@) - @rustup run nightly cargo xbuild --release --target=gba.json --example=$${OUTNAME} + @rustup run nightly cargo build --release --target=gba.json --example=$${OUTNAME} cargo-debug-%: $(RUSTFILES) out/crt0.o @OUTNAME=$(patsubst cargo-debug-%,%, $@) - @rustup run nightly cargo xbuild --target=gba.json --example=$${OUTNAME} + @rustup run nightly cargo build --target=gba.json --example=$${OUTNAME} out/crt0.o: crt0.s interrupt_simple.s @mkdir -p $(dir $@) @$(CC) $(ARCH) -o out/crt0.o crt0.s clippy: - rustup run nightly cargo xclippy --target=gba.json + rustup run nightly cargo clippy --target=gba.json doc: - rustup run nightly cargo xdoc --target=gba.json \ No newline at end of file + rustup run nightly cargo doc --target=gba.json \ No newline at end of file diff --git a/README.md b/README.md index e6fd69de..8caa5c06 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ examples as documentation. * Nightly rust, probably quite a recent version. * Devkitarm. -* Cargo-xbuild is used too. This is probably easiest to do in a container, the `start-dev.sh` script creates and runs a development environment in a docker container.