You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constOLD:&str = "#if defined(_WIN32)\n #define MI_TLS_MODEL_DYNAMIC_WIN32 1 \n#elif defined(__APPLE__) && MI_HAS_TLS_SLOT && !defined(__POWERPC__) // macOS on arm64 or x64\n // #define MI_TLS_MODEL_DYNAMIC_PTHREADS 1 // also works but a bit slower\n #define MI_TLS_MODEL_FIXED_SLOT 1\n #define MI_TLS_MODEL_FIXED_SLOT_DEFAULT 108 // seems unused. @apple: it would be great to get 2 official slots for custom allocators :-)\n #define MI_TLS_MODEL_FIXED_SLOT_CACHED 109\n // we used before __PTK_FRAMEWORK_OLDGC_KEY9 (89) but that seems used now.\n // see <https://github.com/rweichler/substrate/blob/master/include/pthread_machdep.h>\n#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__ANDROID__)\n #define MI_TLS_MODEL_DYNAMIC_PTHREADS 1\n // #define MI_TLS_MODEL_DYNAMIC_PTHREADS_DEFAULT_ENTRY_IS_NULL 1\n#else\n #define MI_TLS_MODEL_THREAD_LOCAL 1\n#endif";
58
+
// The block we're looking for in upstream's prim.h (v3.3.2).
59
+
// Each line is a separate string literal joined by concat! — preserves
60
+
// exact whitespace (including trailing spaces) and is immune to editor
61
+
// "trim trailing whitespace" settings.
62
+
constOLD:&str = concat!(
63
+
"#if defined(_WIN32)\n",
64
+
" #define MI_TLS_MODEL_DYNAMIC_WIN32 1 \n",
65
+
"#elif defined(__APPLE__) && MI_HAS_TLS_SLOT && !defined(__POWERPC__) // macOS on arm64 or x64\n",
66
+
" // #define MI_TLS_MODEL_DYNAMIC_PTHREADS 1 // also works but a bit slower\n",
67
+
" #define MI_TLS_MODEL_FIXED_SLOT 1\n",
68
+
" #define MI_TLS_MODEL_FIXED_SLOT_DEFAULT 108 // seems unused. @apple: it would be great to get 2 official slots for custom allocators :-)\n",
69
+
" #define MI_TLS_MODEL_FIXED_SLOT_CACHED 109\n",
70
+
" // we used before __PTK_FRAMEWORK_OLDGC_KEY9 (89) but that seems used now.\n",
71
+
" // see <https://github.com/rweichler/substrate/blob/master/include/pthread_machdep.h>\n",
0 commit comments