Disabling threads on apple's hardware when optimizer is turned off (#692)
* Disabling threads on apple's hardware. * Turns out that you can have your bread, your butter and you cake too!
This commit is contained in:
parent
0fd159dadb
commit
4af7d6f108
|
@ -81,6 +81,18 @@
|
|||
#define SIMDJSON_THREADS_ENABLED
|
||||
#endif
|
||||
|
||||
|
||||
// workaround for large stack sizes under -O0.
|
||||
// https://github.com/simdjson/simdjson/issues/691
|
||||
#ifdef __APPLE__
|
||||
#ifndef __OPTIMIZE__
|
||||
// Apple systems have small stack sizes in secondary threads.
|
||||
// Lack of compiler optimization may generate high stack usage.
|
||||
// So we are disabling multithreaded support for safety.
|
||||
#undef SIMDJSON_THREADS_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
|
||||
#elif defined(__GNUC__)
|
||||
|
|
Loading…
Reference in New Issue