Skip to content

Commit 73aafc1

Browse files
Merge #37
37: Borsify rustgc r=ltratt a=jacob-hughes This adds test coverage for `--feature rustgc`. It can be merged once #21 lands. Co-authored-by: Jacob Hughes <[email protected]>
2 parents dbf5687 + 264e7cd commit 73aafc1

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.buildbot.config.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Config file for continuous integration.
2+
3+
[rust]
4+
codegen-units = 0 # Use many compilation units.
5+
debug-assertions = true # Turn on assertions in rustc.
6+
7+
[build]
8+
docs = false
9+
extended = false
10+
11+
[llvm]
12+
assertions = true # Turn on assertions in LLVM.
13+
use-linker = "gold" # Uses less memory than ld.
14+
15+
[install]
16+
prefix = "build/rustc_boehm"
17+
sysconfdir = "etc"

.buildbot.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ cargo check
1616

1717
rustup toolchain install nightly --allow-downgrade --component rustfmt
1818
cargo +nightly fmt --all -- --check
19+
20+
# Build and test with rustgc
21+
git clone https://github.com/softdevteam/rustgc
22+
mkdir -p rustgc/build/rustgc
23+
(cd rustgc && ./x.py build --config ../.buildbot.config.toml)
24+
25+
rustup toolchain link rustgc rustgc/build/x86_64-unknown-linux-gnu/stage1
26+
27+
cargo clean
28+
29+
cargo +rustgc test --features "rustgc"

src/gc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ impl Gc<dyn Any> {
112112
}
113113
}
114114

115-
#[cfg(not(feature = "rustc_boehm"))]
115+
#[cfg(not(feature = "rustgc"))]
116116
pub fn needs_finalizer<T>() -> bool {
117117
std::mem::needs_drop::<T>()
118118
}
119119

120-
#[cfg(feature = "rustc_boehm")]
120+
#[cfg(feature = "rustgc")]
121121
pub fn needs_finalizer<T>() -> bool {
122122
std::mem::needs_finalizer::<T>()
123123
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg_attr(feature = "rustc_boehm", feature(gc))]
1+
#![cfg_attr(feature = "rustgc", feature(gc))]
22
#![feature(core_intrinsics)]
33
#![feature(allocator_api)]
44
#![feature(alloc_layout_extra)]

0 commit comments

Comments
 (0)