zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 36b9e56753dbb8f4a982ab012af420b0e63cf92d (tree)
parent 45a54ef4fa68d0909f15efac2284f5b2efd54ade
Author: SuperAuguste <19855629+SuperAuguste@users.noreply.github.com>
Date:   Sun,  6 Apr 2025 20:45:48 -0400

Remove overzealous LLVM anti-instrumentation attributes

Diffstat:
Msrc/codegen/llvm.zig | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig @@ -1174,8 +1174,10 @@ pub const Object = struct { _ = try attributes.removeFnAttr(.sanitize_thread); } const is_naked = fn_info.cc == .naked; - if (owner_mod.fuzz and !func_analysis.disable_instrumentation and !is_naked) { - try attributes.addFnAttr(.optforfuzzing, &o.builder); + if (!func_analysis.disable_instrumentation and !is_naked) { + if (owner_mod.fuzz) { + try attributes.addFnAttr(.optforfuzzing, &o.builder); + } _ = try attributes.removeFnAttr(.skipprofile); _ = try attributes.removeFnAttr(.nosanitize_coverage); } else {