fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
1.3 KiB40 linesraw
1-include ../../run-make-fulldeps/tools.mk
2
3# How to run this
4# $ ./x.py clean
5# $ ./x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi src/test/run-make
6
7# Supported targets:
8# - thumbv6m-none-eabi (Bare Cortex-M0, M0+, M1)
9# - thumbv7em-none-eabi (Bare Cortex-M4, M7)
10# - thumbv7em-none-eabihf (Bare Cortex-M4F, M7F, FPU, hardfloat)
11# - thumbv7m-none-eabi (Bare Cortex-M3)
12
13# only-thumbv6m-none-eabi
14# only-thumbv7em-none-eabi
15# only-thumbv7em-none-eabihf
16# only-thumbv7m-none-eabi
17
18# For cargo setting
19RUSTC := $(RUSTC_ORIGINAL)
20LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
21# We need to be outside of 'src' dir in order to run cargo
22WORK_DIR := $(TMPDIR)
23
24HERE := $(shell pwd)
25
26CRATE := cortex-m
27CRATE_URL := https://github.com/rust-embedded/cortex-m
28CRATE_SHA1 := a448e9156e2cb1e556e5441fd65426952ef4b927 # 0.5.0
29
30export RUSTFLAGS := --cap-lints=allow
31
32all:
33	env
34	mkdir -p $(WORK_DIR)
35	-cd $(WORK_DIR) && rm -rf $(CRATE)
36	cd $(WORK_DIR) && bash -x $(HERE)/../git_clone_sha1.sh $(CRATE) $(CRATE_URL) $(CRATE_SHA1)
37	# HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
38	# These come from the top-level Rust workspace, that this crate is not a
39	# member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
40	cd $(WORK_DIR) && cd $(CRATE) && env RUSTC_BOOTSTRAP=1 $(CARGO) build --target $(TARGET) -v