Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Borsify rustgc #37

Merged
merged 2 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .buildbot.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Config file for continuous integration.

[rust]
codegen-units = 0 # Use many compilation units.
debug-assertions = true # Turn on assertions in rustc.

[build]
docs = false
extended = false

[llvm]
assertions = true # Turn on assertions in LLVM.
use-linker = "gold" # Uses less memory than ld.

[install]
prefix = "build/rustc_boehm"
sysconfdir = "etc"
11 changes: 11 additions & 0 deletions .buildbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ cargo check

rustup toolchain install nightly --allow-downgrade --component rustfmt
cargo +nightly fmt --all -- --check

# Build and test with rustgc
git clone https://github.com/softdevteam/rustgc
mkdir -p rustgc/build/rustgc
(cd rustgc && ./x.py build --config ../.buildbot.config.toml)

rustup toolchain link rustgc rustgc/build/x86_64-unknown-linux-gnu/stage1

cargo clean

cargo +rustgc test --features "rustgc"
4 changes: 2 additions & 2 deletions src/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ impl Gc<dyn Any> {
}
}

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

#[cfg(feature = "rustc_boehm")]
#[cfg(feature = "rustgc")]
pub fn needs_finalizer<T>() -> bool {
std::mem::needs_finalizer::<T>()
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(feature = "rustc_boehm", feature(gc))]
#![cfg_attr(feature = "rustgc", feature(gc))]
#![feature(core_intrinsics)]
#![feature(allocator_api)]
#![feature(alloc_layout_extra)]
Expand Down