1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Compile ARM CPU decoding functions only if used.

This commit is contained in:
Bartosz Taudul 2020-07-31 01:51:31 +02:00
parent b696f1b466
commit be2ffb2023
2 changed files with 10 additions and 7 deletions

View File

@ -1,10 +1,8 @@
#ifdef _MSC_VER
# pragma warning(disable:4996)
#endif
namespace tracy namespace tracy
{ {
#if defined __linux__ && defined __ARM_ARCH
static const char* DecodeArmImplementer( uint32_t v ) static const char* DecodeArmImplementer( uint32_t v )
{ {
static char buf[16]; static char buf[16];
@ -212,6 +210,8 @@ static const char* DecodeArmPart( uint32_t impl, uint32_t part )
return buf; return buf;
} }
#elif defined __APPLE__ && TARGET_OS_IPHONE == 1
static const char* DecodeIosDevice( const char* id ) static const char* DecodeIosDevice( const char* id )
{ {
static const char* DeviceTable[] = { static const char* DeviceTable[] = {
@ -325,4 +325,6 @@ static const char* DecodeIosDevice( const char* id )
return id; return id;
} }
#endif
} }

View File

@ -37,6 +37,10 @@
# include <sys/sysctl.h> # include <sys/sysctl.h>
#endif #endif
#if defined __APPLE__
# include "TargetConditionals.h"
#endif
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
#include <atomic> #include <atomic>
@ -93,9 +97,6 @@ extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PR
# include <unistd.h> # include <unistd.h>
# include <limits.h> # include <limits.h>
#endif #endif
#if defined __APPLE__
# include "TargetConditionals.h"
#endif
#if defined __linux__ #if defined __linux__
# include <sys/sysinfo.h> # include <sys/sysinfo.h>
# include <sys/utsname.h> # include <sys/utsname.h>