From 839b3a61ad51b385ac28a0123b6cc63d90ef83f8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 16 Dec 2019 13:51:21 -0500 Subject: expose the ability to disable C sanitization and disable C sanitization when building libcs. Empirically, they seem to trigger undef-sanitization. --- src/target.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/target.cpp') diff --git a/src/target.cpp b/src/target.cpp index 03815a20fe..82d5467e26 100644 --- a/src/target.cpp +++ b/src/target.cpp @@ -1606,6 +1606,10 @@ bool target_supports_stack_probing(const ZigTarget *target) { return target->os != OsWindows && target->os != OsUefi && (target->arch == ZigLLVM_x86 || target->arch == ZigLLVM_x86_64); } +bool target_supports_sanitize_c(const ZigTarget *target) { + return true; +} + bool target_requires_pic(const ZigTarget *target, bool linking_libc) { // This function returns whether non-pic code is completely invalid on the given target. return target_is_android(target) || target->os == OsWindows || target->os == OsUefi || target_os_requires_libc(target->os) || -- cgit v1.2.3