Go to the documentation of this file.
24 #ifndef PXR_BASE_ARCH_DEFINES_H
25 #define PXR_BASE_ARCH_DEFINES_H
31 #if defined(__linux__)
33 #elif defined(__APPLE__)
34 #include "TargetConditionals.h"
35 #define ARCH_OS_DARWIN
41 #elif defined(_WIN32) || defined(_WIN64)
42 #define ARCH_OS_WINDOWS
49 #if defined(i386) || defined(__i386__) || defined(__x86_64__) || \
50 defined(_M_IX86) || defined(_M_X64)
51 #define ARCH_CPU_INTEL
52 #elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM)
60 #if defined(__x86_64__) || defined(__aarch64__) || defined(_M_X64)
63 #error "Unsupported architecture. x86_64 or ARM64 required."
70 #if defined(__clang__)
71 #define ARCH_COMPILER_CLANG
72 #define ARCH_COMPILER_CLANG_MAJOR __clang_major__
73 #define ARCH_COMPILER_CLANG_MINOR __clang_minor__
74 #define ARCH_COMPILER_CLANG_PATCHLEVEL __clang_patchlevel__
75 #elif defined(__GNUC__)
76 #define ARCH_COMPILER_GCC
77 #define ARCH_COMPILER_GCC_MAJOR __GNUC__
78 #define ARCH_COMPILER_GCC_MINOR __GNUC_MINOR__
79 #define ARCH_COMPILER_GCC_PATCHLEVEL __GNUC_PATCHLEVEL__
81 #define ARCH_COMPILER_ICC
82 #elif defined(_MSC_VER)
83 #define ARCH_COMPILER_MSVC
84 #define ARCH_COMPILER_MSVC_VERSION _MSC_VER
92 #if defined(ARCH_OS_LINUX) && defined(ARCH_COMPILER_GCC)
93 #define ARCH_HAS_GNU_STL_EXTENSIONS
98 #if !(defined(ARCH_OS_DARWIN) && defined(ARCH_COMPILER_CLANG))
99 #define ARCH_HAS_THREAD_LOCAL
103 #if defined(ARCH_OS_LINUX)
104 #define ARCH_HAS_MMAP_MAP_POPULATE
107 #endif // PXR_BASE_ARCH_DEFINES_H