File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ use std::env;
5
5
use std:: ffi:: OsStr ;
6
6
use std:: path:: { Path , PathBuf } ;
7
7
8
+ pub const OBJECT_FILE_NAME : & str = "afl-compiler-rt.o" ;
9
+
8
10
fn xdg_base_dir ( ) -> xdg:: BaseDirectories {
9
11
xdg:: BaseDirectories :: with_prefix ( "afl.rs" )
10
12
}
@@ -52,7 +54,7 @@ pub fn afl_llvm_dir() -> Result<PathBuf> {
52
54
}
53
55
54
56
pub fn object_file_path ( ) -> Result < PathBuf > {
55
- afl_llvm_dir ( ) . map ( |path| path. join ( "libafl-llvm-rt.o" ) )
57
+ afl_llvm_dir ( ) . map ( |path| path. join ( OBJECT_FILE_NAME ) )
56
58
}
57
59
58
60
pub fn plugins_available ( ) -> Result < bool > {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ fn build_afl(args: &Args, work_dir: &Path) -> Result<()> {
125
125
126
126
fn build_afl_llvm_runtime ( _args : & Args , work_dir : & Path ) -> Result < ( ) > {
127
127
let object_file_path = common:: object_file_path ( ) ?;
128
- let _: u64 = std:: fs:: copy ( work_dir. join ( "afl-compiler-rt.o" ) , & object_file_path)
128
+ let _: u64 = std:: fs:: copy ( work_dir. join ( common :: OBJECT_FILE_NAME ) , & object_file_path)
129
129
. with_context ( || "could not copy object file" ) ?;
130
130
131
131
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments