libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

sanitizer_definitions.h (1085B)


      1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style
      4 // license that can be found in the LICENSE file.
      5 
      6 #ifndef LIB_JXL_BASE_SANITIZER_DEFINITIONS_H_
      7 #define LIB_JXL_BASE_SANITIZER_DEFINITIONS_H_
      8 
      9 #ifdef MEMORY_SANITIZER
     10 #define JXL_MEMORY_SANITIZER 1
     11 #elif defined(__has_feature)
     12 #if __has_feature(memory_sanitizer)
     13 #define JXL_MEMORY_SANITIZER 1
     14 #else
     15 #define JXL_MEMORY_SANITIZER 0
     16 #endif
     17 #else
     18 #define JXL_MEMORY_SANITIZER 0
     19 #endif
     20 
     21 #ifdef ADDRESS_SANITIZER
     22 #define JXL_ADDRESS_SANITIZER 1
     23 #elif defined(__has_feature)
     24 #if __has_feature(address_sanitizer)
     25 #define JXL_ADDRESS_SANITIZER 1
     26 #else
     27 #define JXL_ADDRESS_SANITIZER 0
     28 #endif
     29 #else
     30 #define JXL_ADDRESS_SANITIZER 0
     31 #endif
     32 
     33 #ifdef THREAD_SANITIZER
     34 #define JXL_THREAD_SANITIZER 1
     35 #elif defined(__has_feature)
     36 #if __has_feature(thread_sanitizer)
     37 #define JXL_THREAD_SANITIZER 1
     38 #else
     39 #define JXL_THREAD_SANITIZER 0
     40 #endif
     41 #else
     42 #define JXL_THREAD_SANITIZER 0
     43 #endif
     44 #endif  // LIB_JXL_BASE_SANITIZER_DEFINITIONS_H