diff --git a/.buildbot.config.toml b/.buildbot.config.toml new file mode 100644 index 0000000..bed7239 --- /dev/null +++ b/.buildbot.config.toml @@ -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" diff --git a/.buildbot.sh b/.buildbot.sh index 0ef176b..5cbf7ff 100644 --- a/.buildbot.sh +++ b/.buildbot.sh @@ -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" diff --git a/src/gc.rs b/src/gc.rs index 80aff0e..93d4c81 100644 --- a/src/gc.rs +++ b/src/gc.rs @@ -112,12 +112,12 @@ impl Gc { } } -#[cfg(not(feature = "rustc_boehm"))] +#[cfg(not(feature = "rustgc"))] pub fn needs_finalizer() -> bool { std::mem::needs_drop::() } -#[cfg(feature = "rustc_boehm")] +#[cfg(feature = "rustgc")] pub fn needs_finalizer() -> bool { std::mem::needs_finalizer::() } diff --git a/src/lib.rs b/src/lib.rs index 0fcf10f..31e6a48 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)]