mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-31 03:08:54 +00:00
Add attributes for sanitize_memory and sanitize_thread
This commit is contained in:
@@ -1747,11 +1747,40 @@ gb_internal bool init_build_paths(String init_filename) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (build_context.sanitizer_flags & SanitizerFlag_Address) {
|
||||
switch (build_context.metrics.os) {
|
||||
case TargetOs_windows:
|
||||
case TargetOs_linux:
|
||||
case TargetOs_darwin:
|
||||
break;
|
||||
default:
|
||||
gb_printf_err("-sanitize:memory is only supported on windows, linux, and darwin\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (build_context.sanitizer_flags & SanitizerFlag_Memory) {
|
||||
if (build_context.metrics.os != TargetOs_linux) {
|
||||
switch (build_context.metrics.os) {
|
||||
case TargetOs_linux:
|
||||
break;
|
||||
default:
|
||||
gb_printf_err("-sanitize:memory is only supported on linux\n");
|
||||
return false;
|
||||
}
|
||||
if (build_context.metrics.os != TargetOs_linux) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (build_context.sanitizer_flags & SanitizerFlag_Thread) {
|
||||
switch (build_context.metrics.os) {
|
||||
case TargetOs_linux:
|
||||
case TargetOs_darwin:
|
||||
break;
|
||||
default:
|
||||
gb_printf_err("-sanitize:thread is only supported on linux and darwin\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user