Skip to content

Commit

Permalink
Touch up PR 1110
Browse files Browse the repository at this point in the history
- cargo-careful bug has been fixed in 0.4.2
- move cfgs set by build scripts to cargo:rustc-check-cfg to be able to catch misuse
  • Loading branch information
taiki-e committed May 19, 2024
1 parent c9c5b9c commit 1b54f6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(crossbeam_loom)',
'cfg(crossbeam_no_atomic)',
'cfg(crossbeam_sanitize)',
'cfg(crossbeam_sanitize_thread)',
] }
unreachable_pub = "warn"
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
5 changes: 1 addition & 4 deletions ci/careful.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ set -euxo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..

# TODO: Once cargo-careful's bug (https://github.com/RalfJung/cargo-careful/issues/31) is fixed,
# stop reverting back to the system's default linker, instead of rust-lld, which became the new
# default on linux recently (nightly-2024-05-18 and onwards).
export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout -Z linker-features=-lld"
export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout"

cargo careful test --all --all-features --exclude benchmarks -- --test-threads=1
1 change: 1 addition & 0 deletions crossbeam-utils/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ include!("build-common.rs");

fn main() {
println!("cargo:rerun-if-changed=no_atomic.rs");
println!("cargo:rustc-check-cfg=cfg(crossbeam_no_atomic,crossbeam_sanitize_thread)");

let target = match env::var("TARGET") {
Ok(target) => convert_custom_linux_target(target),
Expand Down

0 comments on commit 1b54f6e

Please sign in to comment.