]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: make it compatible with AFL and honggfuzz again
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 21 Dec 2021 21:05:10 +0000 (21:05 +0000)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 22 Dec 2021 15:03:18 +0000 (15:03 +0000)
afl-clang and hufzz-clang try to instrument the code and the
underlying compilers don't like it. It should probably be
fixed in both afl and honggfuzz eventually but until then
let's just use "raw" clang to build bpf-skeletons.

It's a follow-up to https://github.com/systemd/systemd/pull/21607

meson.build

index 6eae80608ce1192d616672b64a479f5ee5b9b051..c0cbadecb1238bf1f0bc769c8375543a79d56b86 100644 (file)
@@ -997,6 +997,9 @@ else
         # Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
         # (like clang-10/llvm-strip-10)
         clang_bin = cc.get_id() == 'clang' ? cc.cmd_array()[0] : 'clang'
+        if clang_bin.contains('afl-clang') or clang_bin.contains('hfuzz-clang')
+                clang_bin = 'clang'
+        endif
         clang = find_program(clang_bin, required : bpf_framework_required)
         if clang.found()
                 llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',