mirror of
https://github.com/open-goal/jak-project
synced 2026-07-08 14:36:52 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user