@@ -259,10 +259,12 @@ pub fn build(b: *std.Build) !void {
259
259
});
260
260
if (enable_lto ) {
261
261
llvm_c_flags .appendSliceAssumeCapacity (&.{
262
- "-DAFL_CLANG_LDPATH=1" ,
263
- "-DAFL_REAL_LD=\" lld\" " ,
264
262
"-DAFL_CLANG_FLTO=\" -flto\" " ,
265
263
});
264
+ } else {
265
+ llvm_c_flags .appendSliceAssumeCapacity (&.{
266
+ "-DAFL_CLANG_FLTO=\"\" " ,
267
+ });
266
268
}
267
269
if (target .query .isNative ()) {
268
270
llvm_c_flags .appendAssumeCapacity ("-march=native" );
@@ -385,6 +387,8 @@ pub fn build(b: *std.Build) !void {
385
387
// LLVM instrumentation executable suite
386
388
const llvm_exes_step = b .step ("llvm_exes" , "Install LLVM instrumentation executable suite" );
387
389
390
+ const dynamic_list_install = b .addInstallFile (AFLplusplus_dep .path ("dynamic_list.txt" ), "dynamic_list.txt" );
391
+
388
392
const cc_exe = b .addExecutable (.{
389
393
.name = "afl-cc" ,
390
394
.target = target ,
@@ -401,6 +405,7 @@ pub fn build(b: *std.Build) !void {
401
405
cc_exe .linkLibC ();
402
406
403
407
const cc_exe_install = b .addInstallArtifact (cc_exe , .{});
408
+ cc_exe_install .step .dependOn (& dynamic_list_install .step );
404
409
cc_exe_install .step .dependOn (llvm_objs_step );
405
410
cc_exe_install .step .dependOn (llvm_libs_step );
406
411
llvm_exes_step .dependOn (& cc_exe_install .step );
@@ -420,6 +425,7 @@ pub fn build(b: *std.Build) !void {
420
425
ld_lto_exe .linkLibC ();
421
426
422
427
const ld_lto_exe_install = b .addInstallArtifact (ld_lto_exe , .{});
428
+ ld_lto_exe_install .step .dependOn (& dynamic_list_install .step );
423
429
ld_lto_exe_install .step .dependOn (llvm_objs_step );
424
430
ld_lto_exe_install .step .dependOn (llvm_libs_step );
425
431
llvm_exes_step .dependOn (& ld_lto_exe_install .step );
@@ -580,6 +586,8 @@ const LLVM_EXE_C_FLAGS = .{
580
586
"-Wno-variadic-macros" ,
581
587
"-Wno-deprecated-copy-with-dtor" ,
582
588
"-DUSE_BINDIR=1" ,
589
+ "-DAFL_REAL_LD=\" lld\" " ,
590
+ "-DAFL_CLANG_LDPATH=1" ,
583
591
};
584
592
585
593
const LLVM_EXE_CPP_FLAGS = .{
0 commit comments