Unittest buildfixes on mac

This commit is contained in:
Henrik Rydgård 2021-06-12 22:42:10 +02:00
parent b42e49d49d
commit 50d9d7ea6f
5 changed files with 19 additions and 4 deletions

View File

@ -2234,6 +2234,7 @@ if(UNITTEST)
unittest/TestArm64Emitter.cpp
unittest/TestX64Emitter.cpp
unittest/TestVertexJit.cpp
unittest/TestThreadManager.cpp
unittest/JitHarness.cpp
Core/MIPS/ARM/ArmRegCache.cpp
Core/MIPS/ARM/ArmRegCacheFPU.cpp

View File

@ -132,7 +132,11 @@ void AssertCurrentThreadName(const char *threadName) {
int GetCurrentThreadIdForDebug() {
#if PPSSPP_PLATFORM(WINDOWS)
return (int)GetCurrentThreadId();
#elif PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(IOS) || defined(__OpenBSD__) || defined(__FreeBSD__)
uint64_t tid = 0;
pthread_threadid_np(NULL, &tid);
return (int)tid;
#else
return gettid();
return (int)gettid();
#endif
}

@ -1 +1 @@
Subproject commit a488ba114ec17ea1054b9057c26a046fc122b3b6
Subproject commit 56421f34e4ab5c17cbac0832bd12413e4f27ecf9

View File

@ -1,5 +1,3 @@
#pragma once
#include "Common/Log.h"
#include "Common/TimeUtil.h"
#include "Common/Thread/ThreadManager.h"

View File

@ -1,3 +1,7 @@
#include "ppsspp_config.h"
#if PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86)
#include "Common/x64Emitter.h"
#include "Core/MIPS/x86/RegCacheFPU.h"
#include "Core/MIPS/x86/Jit.h"
@ -41,3 +45,11 @@ bool TestX64Emitter() {
PrintLast(emitter);
return true;
}
#else
bool TestX64Emitter() {
return true;
}
#endif