Skip to content

Commit 93373e1

Browse files
committed
Don't build alloc_system as part of the sysroot
1 parent b36fd9d commit 93373e1

File tree

6 files changed

+5
-29
lines changed

6 files changed

+5
-29
lines changed

build_sysroot/Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_sysroot/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ alloc = { path = "./sysroot_src/library/alloc" }
99
std = { path = "./sysroot_src/library/std", features = ["panic_unwind", "backtrace"] }
1010
test = { path = "./sysroot_src/library/test" }
1111

12-
alloc_system = { path = "./alloc_system" }
13-
1412
compiler_builtins = { version = "0.1.39", default-features = false, features = ["no-asm"] }
1513

1614
[patch.crates-io]

build_sysroot/alloc_system/Cargo.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

example/alloc_example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(start, box_syntax, alloc_system, core_intrinsics, alloc_prelude, alloc_error_handler)]
1+
#![feature(start, box_syntax, core_intrinsics, alloc_prelude, alloc_error_handler)]
22
#![no_std]
33

44
extern crate alloc;

build_sysroot/alloc_system/lib.rs renamed to example/alloc_system.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010
#![no_std]
11-
#![feature(allocator_api)]
11+
#![feature(allocator_api, rustc_private)]
1212
#![cfg_attr(any(unix, target_os = "redox"), feature(libc))]
1313

1414
// The minimum alignment guaranteed by the architecture. This value is used to

scripts/tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function no_sysroot_tests() {
3434
}
3535

3636
function base_sysroot_tests() {
37+
echo "[AOT] alloc_system"
38+
$MY_RUSTC example/alloc_system.rs --crate-type lib --target "$TARGET_TRIPLE"
39+
3740
echo "[AOT] alloc_example"
3841
$MY_RUSTC example/alloc_example.rs --crate-type bin --target "$TARGET_TRIPLE"
3942
$RUN_WRAPPER ./target/out/alloc_example

0 commit comments

Comments
 (0)