From 390a00a419d075a9a94d89ad948ec2eb44a5fd8b Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Tue, 17 Jun 2025 15:52:06 -0700 Subject: [PATCH] ET_HAS_EXCEPTIONS: require defined(_MSC_VER) to conclude _HAS_EXCEPTIONS implies exceptions are on _HAS_EXCEPTIONS might get defined on some other platform by coincidence; require it to be actual MSVC for us to conclude exceptions are on. Differential Revision: [D76857541](https://our.internmc.facebook.com/intern/diff/D76857541/) [ghstack-poisoned] --- runtime/platform/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/platform/compiler.h b/runtime/platform/compiler.h index 864b76e2050..f8588930e15 100644 --- a/runtime/platform/compiler.h +++ b/runtime/platform/compiler.h @@ -173,7 +173,7 @@ using ssize_t = ptrdiff_t; #ifdef __EXCEPTIONS #define ET_HAS_EXCEPTIONS 1 -#elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS +#elif defined(_MSC_VER) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS #define ET_HAS_EXCEPTIONS 1 #else #define ET_HAS_EXCEPTIONS 0