Skip to content

Commit 2092b6e

Browse files
committed
chore(dnsdist): Add custom target for fuzz-targets
1 parent 13a1c96 commit 2092b6e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

pdns/dnsdistdist/meson.build

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ tools = {
477477
},
478478
}
479479

480+
fuzz_targets = []
481+
480482
if get_option('fuzz-targets')
481483
fuzz_extra_sources = []
482484
fuzzer_ldflags = []
@@ -496,6 +498,7 @@ if get_option('fuzz-targets')
496498
]
497499
},
498500
}
501+
fuzz_targets += 'fuzz-target-dnsdistcache'.underscorify()
499502
if get_option('xsk').allowed() and dep_libbpf.found() and dep_libxdp.found()
500503
tools += {
501504
'fuzz-target-xsk' : {
@@ -513,6 +516,7 @@ if get_option('fuzz-targets')
513516
]
514517
},
515518
}
519+
fuzz_targets += 'fuzz-target-xsk'.underscorify()
516520
endif
517521
endif
518522

@@ -664,6 +668,19 @@ foreach tool, info: tools
664668
endif
665669
endforeach
666670

671+
if get_option('fuzz-targets')
672+
real_fuzz_targets = []
673+
foreach name : fuzz_targets
674+
real_fuzz_targets += get_variable(name)
675+
endforeach
676+
custom_target('fuzz-targets',
677+
command: ['/bin/true'],
678+
output: 'fuzz-targets',
679+
build_always_stale: true,
680+
depends: real_fuzz_targets
681+
)
682+
endif
683+
667684
if get_option('unit-tests')
668685
test('testrunner', testrunner)
669686
endif

0 commit comments

Comments
 (0)