Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove linker hack #50

Merged
merged 5 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
ubuntu-nightly:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -25,7 +25,7 @@ jobs:
run: ./test.sh

ubuntu-beta:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -39,7 +39,7 @@ jobs:
run: ./test.sh

ubuntu-stable:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "honggfuzz"
version = "0.5.53"
version = "0.5.54"
edition = "2018"
authors = ["Paul Grandperrin <[email protected]>"]
license = "MIT/Apache-2.0/Unlicense/WTFPL"
Expand Down
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ fn main() {
// check that "cargo hfuzz" command is at the same version as this file
let honggfuzz_build_version = env::var("CARGO_HONGGFUZZ_BUILD_VERSION").unwrap_or("unknown".to_string());
if VERSION != honggfuzz_build_version {
eprintln!("honggfuzz dependency ({}) and build command ({}) versions do not match",
eprintln!("The version of the honggfuzz library dependency ({0}) and the version of the `cargo-hfuzz` executable ({1}) do not match.\n\
If updating both by running `cargo update` and `cargo install honggfuzz` does not work, you can either:\n\
- change the dependency in `Cargo.toml` to `honggfuzz = \"={1}\"`\n\
- or run `cargo install honggfuzz --version {0}`",
VERSION, honggfuzz_build_version);
process::exit(1);
}
Expand Down
18 changes: 0 additions & 18 deletions src/bin/cargo-hfuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,6 @@ fn hfuzz_run<T>(mut args: T, crate_root: &Path, build_type: &BuildType) where T:
fn hfuzz_build<T>(args: T, crate_root: &Path, build_type: &BuildType) where T: std::iter::Iterator<Item=String> {
let honggfuzz_target = env::var("CARGO_TARGET_DIR").unwrap_or_else(|_| HONGGFUZZ_TARGET.into());

// HACK: temporary fix, see https://github.com/rust-lang/rust/issues/53945#issuecomment-426824324
let use_gold_linker: bool = match Command::new("which") // check if the gold linker is available
.args(&["ld.gold"])
.status() {
Err(_) => false,
Ok(status) => {
match status.code() {
Some(0) => true,
_ => false
}
}
};

let mut rustflags = "\
--cfg fuzzing \
-C debug-assertions \
Expand Down Expand Up @@ -194,11 +181,6 @@ fn hfuzz_build<T>(args: T, crate_root: &Path, build_type: &BuildType) where T: s
-C llvm-args=-sanitizer-coverage-trace-compares \
");
}

// HACK: temporary fix, see https://github.com/rust-lang/rust/issues/53945#issuecomment-426824324
if use_gold_linker {
rustflags.push_str("-Clink-arg=-fuse-ld=gold ");
}
}
}
}
Expand Down