Remove overzealous LLVM anti-instrumentation attributes

This commit is contained in:
SuperAuguste 2025-04-06 20:45:48 -04:00 committed by Alex Rønne Petersen
parent b2feb0d575
commit 60922dbf34
No known key found for this signature in database

View File

@ -1472,8 +1472,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 {