Skip to content

Commit d9261d1

Browse files
committed
thirdparty: remove the atomic_thread_fence redefines for latest tcc on macos (not needed anymore)
1 parent 4f6ebfb commit d9261d1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎thirdparty/stdatomic/nix/atomic.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,17 @@ typedef volatile uintptr_t atomic_uintptr_t;
5454
extern void atomic_thread_fence (int memory_order);
5555
extern void __atomic_thread_fence (int memory_order);
5656

57-
// workaround for tcc/aarch64
58-
#if defined(__aarch64__) || defined(_M_ARM64)
57+
// workaround for tcc/aarch64; Note: latest prebuilt tcc works, and does not need this hack:
58+
#if !defined(__APPLE__)
59+
#if (defined(__aarch64__) || defined(_M_ARM64))
5960
// `_V_atomic_thread_fence` is defined in `atomic.S`
6061
extern void _V_atomic_thread_fence(int memory_order);
6162
#define atomic_thread_fence(order) _V_atomic_thread_fence(order)
6263
#define __atomic_thread_fence(order) _V_atomic_thread_fence(order)
6364
#else
6465
#define atomic_thread_fence(order) __atomic_thread_fence(order)
6566
#endif
67+
#endif
6668

6769
// use functions for 64, 32 and 8 bit from libatomic directly
6870
// since tcc is not capible to use "generic" C functions

0 commit comments

Comments
 (0)