From 91442e5c6b072c920a4ba63bc3194bce5df50ca6 Mon Sep 17 00:00:00 2001 From: Jacob Hughes Date: Wed, 23 Dec 2020 17:38:01 +0000 Subject: [PATCH 1/2] Add rustgc feature to bors --- .buildbot.config.toml | 17 +++++++++++++++++ .buildbot.sh | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .buildbot.config.toml 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" From 264e7cdd849afc0138a827e515d340f87be9e2cc Mon Sep 17 00:00:00 2001 From: Jacob Hughes Date: Wed, 23 Dec 2020 17:39:01 +0000 Subject: [PATCH 2/2] Rename conditional compilation attrs to rustgc --- src/gc.rs | 4 ++-- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)]