MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_compile_flags

Method get_compile_flags

src/execution/mod.rs:126–152  ·  view source on GitHub ↗
(&self, kind: &Compile)

Source from the content-addressed store, hash-verified

124 }
125
126 fn get_compile_flags(&self, kind: &Compile) -> (Vec<&'static str>, &'static PathBuf) {
127 let (cflags, lib) = match kind {
128 Compile::SANITIZE => {
129 let flags = crate::config::SANITIZER_FLAGS.to_vec();
130 let san_lib = crate::deopt::utils::get_san_lib_path(&self.deopt);
131 (flags, san_lib)
132 }
133 Compile::FUZZER => {
134 let flags = crate::config::FUZZER_FLAGS.to_vec();
135 let fuzz_lib = crate::deopt::utils::get_fuzzer_lib_path(&self.deopt);
136 (flags, fuzz_lib)
137 }
138 Compile::COVERAGE => {
139 let flags = crate::config::COVERAGE_FLAGS.to_vec();
140 let cov_lib = crate::deopt::utils::get_cov_lib_path(&self.deopt, false);
141 (flags, cov_lib)
142 }
143 Compile::Minimize => {
144 let mut flags = crate::config::SANCOV_FLAGS.to_vec();
145 let min_flag = get_minimize_compile_flag();
146 flags.push(min_flag);
147 let fuzz_lib = crate::deopt::utils::get_sancov_lib_path(&self.deopt);
148 (flags, fuzz_lib)
149 }
150 };
151 (cflags, lib)
152 }
153
154 /// compile programs into binary.
155 pub fn compile(&self, programs: Vec<&Path>, out: &Path, kind: Compile) -> Result<()> {

Callers 1

compileMethod · 0.80

Calls 6

get_san_lib_pathFunction · 0.85
get_fuzzer_lib_pathFunction · 0.85
get_cov_lib_pathFunction · 0.85
get_sancov_lib_pathFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected