Skip to content

Commit

Permalink
Only enable -fuse-ld=gold on Linux. (#147)
Browse files Browse the repository at this point in the history
Fixes #146.
  • Loading branch information
frewsxcv authored Dec 2, 2018
1 parent c9a3a1c commit 0d56815
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/bin/cargo-afl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,13 @@ where
common::afl_llvm_rt_dir().display()
);

// work around https://github.com/rust-fuzz/afl.rs/issues/141 /
// https://github.com/rust-lang/rust/issues/53945, can be removed once
// those are fixed.
rustflags.push_str("-Clink-arg=-fuse-ld=gold");
rustdocflags.push_str("-Clink-arg=-fuse-ld=gold");
if cfg!(linux) {
// work around https://github.com/rust-fuzz/afl.rs/issues/141 /
// https://github.com/rust-lang/rust/issues/53945, can be removed once
// those are fixed.
rustflags.push_str("-Clink-arg=-fuse-ld=gold");
rustdocflags.push_str("-Clink-arg=-fuse-ld=gold");
}

// add user provided flags
rustflags.push_str(&env::var("RUSTFLAGS").unwrap_or_default());
Expand Down

0 comments on commit 0d56815

Please sign in to comment.