Browse Source

Define empty `gb_no_asan` if VS < 2022

Jeroen van Rijn 3 tháng trước cách đây
mục cha
commit
6cb2408d70
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/gb/gb.h

+ 5 - 1
src/gb/gb.h

@@ -497,7 +497,11 @@ typedef i32 b32; // NOTE(bill): Prefer this!!!
 
 #if !defined(gb_no_asan)
 	#if defined(_MSC_VER)
-		#define gb_no_asan __declspec(no_sanitize_address)
+		#if _MSC_VER >= 1930
+			#define gb_no_asan __declspec(no_sanitize_address)
+		#else
+			#define gb_no_asan
+		#endif
 	#else
 		#define gb_no_asan __attribute__((disable_sanitizer_instrumentation))
 	#endif