Skip to content

Commit e13dd75

Browse files
committed
Exposed llvm-config-path of AFLplusplus in zig-afl-kit
1 parent f003bfe commit e13dd75

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ afl_obj.root_module.stack_check = false; // not linking with compiler-rt
3535
afl_obj.root_module.link_libc = true; // afl runtime depends on libc
3636
3737
// Generate an instrumented executable:
38-
const afl_fuzz = afl.addInstrumentedExe(b, afl_obj);
38+
const afl_fuzz = afl.addInstrumentedExe(b, target, optimize, afl_obj);
3939
4040
// Install it
4141
fuzz.dependOn(&b.addInstallBinFile(afl_fuzz, "myfuzz-afl").step);

build.zig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,17 @@ pub fn addInstrumentedExe(
3838

3939
return exe;
4040
}
41+
42+
const llvm_config: []const []const u8 = b.option(
43+
[]const []const u8,
44+
"llvm-config-path",
45+
"Path that contains llvm-config",
46+
) orelse &.{};
47+
4148
const afl = afl_kit.builder.dependency("AFLplusplus", .{
4249
.target = target,
4350
.optimize = optimize,
51+
.@"llvm-config-path" = llvm_config,
4452
});
4553

4654
const install_tools = b.addInstallDirectory(.{

0 commit comments

Comments
 (0)