Symcc runtime docsrs fix (#270)
* add symcc as submodule * make build script docs.rs aware * bump version of symcc_runtime
This commit is contained in:
parent
fccb9a1c55
commit
bdd1412fc4
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "libafl_concolic/symcc_runtime/symcc"]
|
||||||
|
path = libafl_concolic/symcc_runtime/symcc
|
||||||
|
url = ../symcc.git
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "symcc_runtime"
|
name = "symcc_runtime"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
description = "Build Concolic Tracing tools based on SymCC in Rust"
|
description = "Build Concolic Tracing tools based on SymCC in Rust"
|
||||||
|
@ -66,7 +66,9 @@ fn main() {
|
|||||||
write_symcc_runtime_bindings_file(&out_path, &cpp_bindings);
|
write_symcc_runtime_bindings_file(&out_path, &cpp_bindings);
|
||||||
write_cpp_function_export_macro(&out_path, &cpp_bindings);
|
write_cpp_function_export_macro(&out_path, &cpp_bindings);
|
||||||
|
|
||||||
if std::env::var("CARGO_FEATURE_NO_CPP_RUNTIME").is_err() {
|
if std::env::var("CARGO_FEATURE_NO_CPP_RUNTIME").is_err()
|
||||||
|
&& std::env::var("DOCS_RS").is_err()
|
||||||
|
{
|
||||||
let rename_header_path = out_path.join("rename.h");
|
let rename_header_path = out_path.join("rename.h");
|
||||||
write_symcc_rename_header(&rename_header_path, &cpp_bindings);
|
write_symcc_rename_header(&rename_header_path, &cpp_bindings);
|
||||||
build_and_link_symcc_runtime(&symcc_src_path, &rename_header_path);
|
build_and_link_symcc_runtime(&symcc_src_path, &rename_header_path);
|
||||||
@ -105,11 +107,15 @@ fn write_cpp_function_export_macro(out_path: &Path, cpp_bindings: &bindgen::Bind
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn checkout_symcc(out_path: &Path) -> PathBuf {
|
fn checkout_symcc(out_path: &Path) -> PathBuf {
|
||||||
let repo_dir = out_path.join("libafl_symcc_src");
|
if std::env::var("DOCS_RS").is_ok() {
|
||||||
if !repo_dir.exists() {
|
"symcc".into()
|
||||||
clone_symcc(&repo_dir);
|
} else {
|
||||||
|
let repo_dir = out_path.join("libafl_symcc_src");
|
||||||
|
if !repo_dir.exists() {
|
||||||
|
clone_symcc(&repo_dir);
|
||||||
|
}
|
||||||
|
repo_dir
|
||||||
}
|
}
|
||||||
repo_dir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_rust_runtime_macro_file(out_path: &Path, symcc_src_path: &Path) {
|
fn write_rust_runtime_macro_file(out_path: &Path, symcc_src_path: &Path) {
|
||||||
|
1
libafl_concolic/symcc_runtime/symcc
Submodule
1
libafl_concolic/symcc_runtime/symcc
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 45cde0269ae22aef4cca2e1fb98c3b24f7bb2984
|
Loading…
x
Reference in New Issue
Block a user