support c++ tools on macos (#2063)

Running reference tests/decompiler should now be possible on macos
(arm). Most of the changes were just cleaning up places where we were
sloppy with ifdefs, but there were two interesting ones:
- `Printer.cpp` was updated to not use a recursive function for printing
lists, to avoid stack overflow
- I replaced xxhash with another version of the same library that
supports arm (the one that comes in zstd). The interface is C instead of
C++ but it's not bad to use. I confirmed that the extractor succeeds on
jak 1 iso so it looks like this gives us the same results as the old
library.
This commit is contained in:
water111
2022-12-22 17:12:05 -05:00
committed by GitHub
parent 98c2291102
commit 73561f10a3
36 changed files with 254 additions and 2050 deletions
+5 -2
View File
@@ -1,9 +1,10 @@
#include "SystemThread.h"
#include "common/common_types.h"
#include "common/log/log.h"
#include "common/util/unicode_util.h"
#ifdef __linux
#ifdef OS_POSIX
#include <pthread.h>
#else
// Include order matters...
@@ -96,8 +97,10 @@ void* bootstrap_thread_func(void* x) {
SystemThread* thd = (SystemThread*)x;
SystemThreadInterface iface(thd);
#ifdef __linux__
#ifdef __linux
pthread_setname_np(pthread_self(), thd->name.c_str());
#elif __APPLE__
pthread_setname_np(thd->name.c_str());
#else
SetThreadDescription(GetCurrentThread(), (LPCWSTR)utf8_string_to_wide_string(thd->name).c_str());
#endif