Skip to content

Commit

Permalink
Work around linking issues from #141, rust-lang/rust#53945 (#144)
Browse files Browse the repository at this point in the history
#141 + rust-lang/rust#53945 track issues with linkage
which regressed when rust updated to llvm 8. This commit adds a work
around for such issues for cargo-afl. This helps with the ergonomics of
cargo-afl, particularly for those less familiar with the project and the
above issues.

These changes can be safely removed once patches are landed in llvm and
rust updates to use the patched version.
  • Loading branch information
SingingTree authored and frewsxcv committed Oct 23, 2018
1 parent 48bee64 commit b92d381
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bin/cargo-afl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ 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");

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

0 comments on commit b92d381

Please sign in to comment.