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

Fix minor build.rs issues w.r.t. custom libfuzzer paths #103

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

addisoncrump
Copy link
Contributor

Makes libfuzzer_sys rebuild if the custom libfuzzer path changes and use the correct lib name if the library is double-prefixed ("liblib").

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@addisoncrump
Copy link
Contributor Author

Wow, that was fast! 😁

@fitzgen
Copy link
Member

fitzgen commented Jan 3, 2023

Heh no problem. Looks like this needs a cargo fmt.

@addisoncrump
Copy link
Contributor Author

Yup, was editing in a simple text editor while I was working with something. Should be good now.

@@ -1,10 +1,13 @@
fn main() {
println!("cargo:rerun-if-env-changed=CUSTOM_LIBFUZZER_PATH");
if let Ok(custom) = ::std::env::var("CUSTOM_LIBFUZZER_PATH") {
let custom_lib_path = ::std::path::PathBuf::from(&custom);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a println!("cargo:rerun-if-changed={custom}"); here might be useful :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point -- added!

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fitzgen fitzgen merged commit 289f20f into rust-fuzz:main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants