[atomic] Disable compiler memory barrier on MSVC
It keeps giving me internal compiler error. https://github.com/harfbuzz/harfbuzz/issues/3728
This commit is contained in:
parent
f0707e2348
commit
9518d602f3
|
@ -111,11 +111,17 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* This we always use std::atomic for; and should never be disabled. */
|
|
||||||
#include <atomic>
|
|
||||||
#ifndef _hb_compiler_memory_r_barrier
|
#ifndef _hb_compiler_memory_r_barrier
|
||||||
|
/* This we always use std::atomic for; and should never be disabled...
|
||||||
|
* except that MSVC gives me an internal compiler error on it. */
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
|
#include <atomic>
|
||||||
#define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire)
|
#define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire)
|
||||||
|
#else
|
||||||
|
#define _hb_compiler_memory_r_barrier() do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _hb_memory_r_barrier
|
#ifndef _hb_memory_r_barrier
|
||||||
|
|
Loading…
Reference in New Issue