43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
#ifndef WVCDM_CDM_COMPILER_DETECTION_H_
|
|
#define WVCDM_CDM_COMPILER_DETECTION_H_
|
|
|
|
// This file makes some best-effort attempts to detect details about the
|
|
// compilation environment used by SetClientInfo.
|
|
|
|
#if defined(CDM_DISABLE_LOGGING)
|
|
# define LOGGING_MESSAGE "Logging Disabled"
|
|
#else
|
|
# define LOGGING_MESSAGE "Logging Enabled"
|
|
#endif
|
|
|
|
#if defined(_DEBUG)
|
|
# define BUILD_FLAVOR_MESSAGE "Debug"
|
|
#elif defined(NDEBUG)
|
|
# define BUILD_FLAVOR_MESSAGE "Release"
|
|
#else
|
|
# define BUILD_FLAVOR_MESSAGE "Unknown"
|
|
#endif
|
|
|
|
#if defined(__x86_64__) || defined(_M_X64)
|
|
# define CPU_ARCH_MESSAGE "x86-64"
|
|
#elif defined(__i386__) || defined(_M_IX86)
|
|
# define CPU_ARCH_MESSAGE "i386"
|
|
#elif defined(__aarch64__) || defined(_M_ARM64)
|
|
# define CPU_ARCH_MESSAGE "AArch64"
|
|
#elif defined(__arm__) || defined(_M_ARM)
|
|
# define CPU_ARCH_MESSAGE "AArch32"
|
|
#elif defined(__mips__)
|
|
# define CPU_ARCH_MESSAGE "MIPS"
|
|
#elif defined(__powerpc64__)
|
|
# define CPU_ARCH_MESSAGE "64-bit PowerPC"
|
|
#elif defined(__powerpc__) || defined(_M_PPC)
|
|
# define CPU_ARCH_MESSAGE "32-bit PowerPC"
|
|
#else
|
|
# define CPU_ARCH_MESSAGE "Unrecognized CPU"
|
|
#endif
|
|
|
|
#endif // WVCDM_CDM_COMPILER_DETECTION_H_
|