]> git.proxmox.com Git - rustc.git/blame - src/test/run-make/thumb-none-cortex-m/Makefile
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / run-make / thumb-none-cortex-m / Makefile
CommitLineData
b7449926
XL
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
dfeec247 13# only-thumb
b7449926
XL
14
15# For cargo setting
16RUSTC := $(RUSTC_ORIGINAL)
17LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
18# We need to be outside of 'src' dir in order to run cargo
19WORK_DIR := $(TMPDIR)
20
21HERE := $(shell pwd)
22
23CRATE := cortex-m
24CRATE_URL := https://github.com/rust-embedded/cortex-m
25CRATE_SHA1 := a448e9156e2cb1e556e5441fd65426952ef4b927 # 0.5.0
26
dfeec247
XL
27# Don't make lints fatal, but they need to at least warn or they break Cargo's target info parsing.
28export RUSTFLAGS := --cap-lints=warn
0bf4aa26 29
b7449926
XL
30all:
31 env
32 mkdir -p $(WORK_DIR)
33 -cd $(WORK_DIR) && rm -rf $(CRATE)
34 cd $(WORK_DIR) && bash -x $(HERE)/../git_clone_sha1.sh $(CRATE) $(CRATE_URL) $(CRATE_SHA1)
a1dfa0c6
XL
35 # HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
36 # These come from the top-level Rust workspace, that this crate is not a
37 # member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
1b1a35ee 38 cd $(WORK_DIR) && cd $(CRATE) && env RUSTC_BOOTSTRAP=1 $(BOOTSTRAP_CARGO) build --target $(TARGET) -v