[compiler-rt] [gwp_asan] Soft-transition ZXTEST_USE_STREAMABLE_MACROS removal (PR #121887)

Caslyn Tonelli via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 21:41:22 PST 2025


https://github.com/Caslyn created https://github.com/llvm/llvm-project/pull/121887

Soft-transition the removal of setting ZXTEST_USE_STREAMABLE_MACROS, by only setting the macro if not already defined. This macro will be set downstream in Fuchsia and a future PR will remove this upstream setting entirely.

>From 976dc88b2088770a3eafc9cbef02044eb2b007ba Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Mon, 6 Jan 2025 21:33:02 -0800
Subject: [PATCH] [gwp_asan] Soft-transition ZXTEST_USE_STREAMABLE_MACROS
 removal

Soft-transition the removal of setting ZXTEST_USE_STREAMABLE_MACROS, by
only setting the macro if not already defined. This macro will be set
downstream in Fuchsia and a future PR will remove this upstream setting
entirely.
---
 compiler-rt/lib/gwp_asan/tests/harness.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compiler-rt/lib/gwp_asan/tests/harness.h b/compiler-rt/lib/gwp_asan/tests/harness.h
index c96f846996d353..3fbcf991c5592f 100644
--- a/compiler-rt/lib/gwp_asan/tests/harness.h
+++ b/compiler-rt/lib/gwp_asan/tests/harness.h
@@ -12,7 +12,9 @@
 #include <stdarg.h>
 
 #if defined(__Fuchsia__)
+#ifndef ZXTEST_USE_STREAMABLE_MACROS
 #define ZXTEST_USE_STREAMABLE_MACROS
+#endif
 #include <zxtest/zxtest.h>
 namespace testing = zxtest;
 // zxtest defines a different ASSERT_DEATH, taking a lambda and an error message



More information about the llvm-commits mailing list