aboutsummaryrefslogtreecommitdiff
path: root/src/target.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-16 16:17:52 -0500
committerGitHub <noreply@github.com>2019-12-16 16:17:52 -0500
commit13cdc137e6389af83f225ab851bf8ef768ebcc69 (patch)
tree34675041bfef45efd3c294f7df9fb244674c6dbf /src/target.cpp
parentde0d8885b4623dab14c379fc844ae0b18d9f8405 (diff)
parent839b3a61ad51b385ac28a0123b6cc63d90ef83f8 (diff)
downloadzig-13cdc137e6389af83f225ab851bf8ef768ebcc69.tar.gz
zig-13cdc137e6389af83f225ab851bf8ef768ebcc69.zip
Merge pull request #3570 from ziglang/c-sanitize-undef
use -fsanitize=undefined for C code in safe build modes
Diffstat (limited to 'src/target.cpp')
-rw-r--r--src/target.cpp4
1 files changed, 4 insertions, 0 deletions
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) ||