Fix publish errors (#2313)

* Fix publish errors

* publish.sh

* remove include_str readme in libafl_qemu

* execute libafl_qemu_build::maybe_generate_stub_bindings() only if in cargo doc
This commit is contained in:
Andrea Fioraldi 2024-06-15 16:26:31 +02:00 committed by GitHub
parent 5a2652b984
commit 888079aea5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -104,5 +104,5 @@ winsafe = {version = "0.0.21", features = ["kernel"]}
serial_test = { version = "3", default-features = false, features = ["logging"] } serial_test = { version = "3", default-features = false, features = ["logging"] }
clap = {version = "4.5", features = ["derive"]} clap = {version = "4.5", features = ["derive"]}
libloading = "0.8" libloading = "0.8"
mimalloc = { version = "*", default-features = false } mimalloc = { version = "0.1", default-features = false }
dlmalloc ={version = "0.2.6", features = ["global"]} dlmalloc ={version = "0.2.6", features = ["global"]}

View File

@ -306,6 +306,7 @@ pub fn store_generated_content_if_different(
.unwrap_or_else(|_| panic!("Unable to write in {}", file_to_update.display())); .unwrap_or_else(|_| panic!("Unable to write in {}", file_to_update.display()));
} }
} }
#[rustversion::nightly] #[rustversion::nightly]
pub fn maybe_generate_stub_bindings( pub fn maybe_generate_stub_bindings(
cpu_target: &str, cpu_target: &str,
@ -313,7 +314,7 @@ pub fn maybe_generate_stub_bindings(
stub_bindings_file: &Path, stub_bindings_file: &Path,
bindings_file: &Path, bindings_file: &Path,
) { ) {
if cpu_target == "x86_64" && emulation_mode == "usermode" { if env::var("CARGO_CFG_DOC").is_ok() && cpu_target == "x86_64" && emulation_mode == "usermode" {
let current_rustc_version = let current_rustc_version =
rustc_version::version().expect("Could not get current rustc version"); rustc_version::version().expect("Could not get current rustc version");
let semver_re = Regex::new(r"/\* (.*) \*/").unwrap(); let semver_re = Regex::new(r"/\* (.*) \*/").unwrap();

View File

@ -1,7 +1,6 @@
//! Welcome to `LibAFL` QEMU //! Welcome to `LibAFL` QEMU
//! //!
//! __Warning__: The documentation is built by default for `x86_64` in `usermode`. To access the documentation of other architectures or `systemmode`, the documentation must be rebuilt with the right features. //! __Warning__: The documentation is built by default for `x86_64` in `usermode`. To access the documentation of other architectures or `systemmode`, the documentation must be rebuilt with the right features.
#![doc = include_str!("../../README.md")]
/*! */ /*! */
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] #![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
#![forbid(unexpected_cfgs)] #![forbid(unexpected_cfgs)]

View File

@ -74,7 +74,7 @@ if git submodule status | grep "^-">/dev/null ; then \
fi fi
cd libafl_concolic/symcc_runtime cd libafl_concolic/symcc_runtime
cargo publish "$@" cargo publish "$@" --allow-dirty
cd ../.. || exit 1 cd ../.. || exit 1
cd libafl_libfuzzer cd libafl_libfuzzer