33FUZZER_NAME =' fuzzer_libafl_cc'
44CARGO_TARGET_DIR = { value = " ${PROJECT_DIR}/target" , condition = { env_not_set = [" CARGO_TARGET_DIR" ] } }
55PROFILE = { value = " release" , condition = {env_not_set = [" PROFILE" ]} }
6- LIBAFL_CC = ' ${CARGO_TARGET_DIR}/${PROFILE}/libafl_cc'
7- LIBAFL_CXX = ' ${CARGO_TARGET_DIR}/${PROFILE}/libafl_cxx'
8- FUZZER = ' ${CARGO_TARGET_DIR}/${PROFILE}/${FUZZER_NAME}'
6+ PROFILE_DIR = {value = " release" , condition = {env_not_set = [" PROFILE_DIR" ] }}
7+ LIBAFL_CC = ' ${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cc'
8+ LIBAFL_CXX = ' ${CARGO_TARGET_DIR}/${PROFILE_DIR}/libafl_cxx'
9+ FUZZER = ' ${CARGO_TARGET_DIR}/${PROFILE_DIR}/${FUZZER_NAME}'
910PROJECT_DIR = { script = [" pwd" ] }
1011
1112[tasks .unsupported ]
@@ -22,7 +23,7 @@ windows_alias = "unsupported"
2223
2324[tasks .cxx_unix ]
2425command = " cargo"
25- args = [" build" , " --${PROFILE}" ]
26+ args = [" build" , " --profile " , " ${PROFILE}" ]
2627
2728[tasks .cc ]
2829linux_alias = " cc_unix"
@@ -31,7 +32,7 @@ windows_alias = "unsupported"
3132
3233[tasks .cc_unix ]
3334command = " cargo"
34- args = [" build" , " --${PROFILE}" ]
35+ args = [" build" , " --profile " , " ${PROFILE}" ]
3536
3637[tasks .crash_cxx ]
3738linux_alias = " crash_cxx_unix"
@@ -40,7 +41,7 @@ windows_alias = "unsupported"
4041
4142[tasks .crash_cxx_unix ]
4243command = " cargo"
43- args = [" build" , " --${PROFILE}" , " --features=crash" ]
44+ args = [" build" , " --profile " , " ${PROFILE}" , " --features=crash" ]
4445
4546[tasks .crash_cc ]
4647linux_alias = " crash_cc_unix"
@@ -49,7 +50,7 @@ windows_alias = "unsupported"
4950
5051[tasks .crash_cc_unix ]
5152command = " cargo"
52- args = [" build" , " --${PROFILE}" , " --features=crash" ]
53+ args = [" build" , " --profile " , " ${PROFILE}" , " --features=crash" ]
5354
5455# Harness
5556[tasks .fuzzer ]
@@ -58,7 +59,7 @@ mac_alias = "fuzzer_unix"
5859windows_alias = " unsupported"
5960
6061[tasks .fuzzer_unix ]
61- command = " ${CARGO_TARGET_DIR}/${PROFILE }/libafl_cc"
62+ command = " ${CARGO_TARGET_DIR}/${PROFILE_DIR }/libafl_cc"
6263args = [" ${PROJECT_DIR}/src/program.c" , " -o" , " ${FUZZER_NAME}" , " -lm" ]
6364dependencies = [ " cxx" , " cc" ]
6465
@@ -69,7 +70,7 @@ mac_alias = "fuzzer_crash_unix"
6970windows_alias = " unsupported"
7071
7172[tasks .fuzzer_crash_unix ]
72- command = " ${CARGO_TARGET_DIR}/${PROFILE }/libafl_cc"
73+ command = " ${CARGO_TARGET_DIR}/${PROFILE_DIR }/libafl_cc"
7374args = [" ${PROJECT_DIR}/src/program.c" , " -o" , " ${FUZZER_NAME}_crash" , " -lm" ]
7475dependencies = [ " crash_cxx" , " crash_cc" ]
7576
@@ -82,7 +83,7 @@ windows_alias = "unsupported"
8283[tasks .run_unix ]
8384script_runner = " @shell"
8485script ='''
85- taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE }/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME} ./corpus/ -t 1000
86+ taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE_DIR }/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME} ./corpus/ -t 1000
8687'''
8788dependencies = [ " fuzzer" ]
8889
@@ -96,7 +97,7 @@ windows_alias = "unsupported"
9697[tasks .crash_unix ]
9798script_runner = " @shell"
9899script ='''
99- taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE }/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME}_crash ./corpus/ -t 1000
100+ taskset -c 1 ${CARGO_TARGET_DIR}/${PROFILE_DIR }/${CARGO_MAKE_PROJECT_NAME} ./${FUZZER_NAME}_crash ./corpus/ -t 1000
100101'''
101102dependencies = [ " fuzzer_crash" ]
102103
0 commit comments