Skip to content

Commit 7c438d4

Browse files
committed
[CI] run-make/thumb: remove hacky workaround.
1 parent 633832f commit 7c438d4

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/bootstrap/test.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,19 @@ impl Step for Compiletest {
975975
builder.ensure(compile::Rustc { compiler, target });
976976
}
977977

978-
if builder.no_std(target) != Some(true) {
978+
if builder.no_std(target) == Some(true) {
979+
// the `test` doesn't compile for no-std targets
980+
builder.ensure(compile::Std { compiler, target });
981+
} else {
979982
builder.ensure(compile::Test { compiler, target });
980983
}
984+
985+
if builder.no_std(target) == Some(true) {
986+
// for no_std run-make (e.g. thumb*),
987+
// we need a host compiler which is called by cargo.
988+
builder.ensure(compile::Std { compiler, target: compiler.host });
989+
}
990+
981991
builder.ensure(native::TestHelpers { target });
982992
builder.ensure(RemoteCopyLibs { compiler, target });
983993

src/test/run-make/thumb-none-cortex-m/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ TMP_DIR := /tmp/safe_place
1111
CRATE := cortex-m
1212
RUSTC := $(RUSTC_ORIGINAL)
1313
LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
14-
HOST := x86_64-unknown-linux-gnu
1514

1615
all:
17-
# Workaround for error[E0463]: can't find crate for `core`
18-
-ln -sv $(SRC)/build/tmp/dist/rust-std-*-$(TARGET)/rust-std-$(TARGET)/lib/rustlib/$(TARGET)/lib/*.rlib $(SRC)/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/$(TARGET)/lib/
19-
# Workaround for error[E0463]: can't find crate for `std`
20-
-ln -sv $(SRC)/build/tmp/dist/rust-std-*-$(HOST)/rust-std-$(HOST)/lib/rustlib/$(HOST)/lib/*.rlib $(SRC)/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/$(HOST)/lib/
2116
env > env.txt
2217
mkdir -p $(TMP_DIR)
2318
-cd $(TMP_DIR) && rm -rf $(CRATE)

0 commit comments

Comments
 (0)