[compiler-rt] Add aligned_alloc to macOS tsan interceptors (PR #79198)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 12:36:00 PST 2024


================
@@ -0,0 +1,61 @@
+// RUN: %clang_tsan -O1 %s -o %t -undefined dynamic_lookup
+// RUN: %deflake %run %t | FileCheck %s
+
+#include "test.h"
+
+#include <stdlib.h>
+
+#if defined(__cplusplus) && (__cplusplus >= 201703L)
+#  define HAVE_ALIGNED_ALLOC 1
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) &&                  \
----------------
vitalybuka wrote:

instead of using `-undefined`, can you make #if #elif ... to avoid `#define HAVE_ALIGNED_ALLOC` conflicts?

https://github.com/llvm/llvm-project/pull/79198


More information about the llvm-commits mailing list