Guard the _Znwj mangling and the exceptions setting at compile time

This commit is contained in:
J. Nick Koston
2026-10-09 11:46:32 -10:00
parent fe151ba802
commit a715bdae7d
+10
View File
@@ -12,8 +12,18 @@
#include <cstdlib>
#include <new>
#include <type_traits>
#include "esp_system.h"
#ifdef __cpp_exceptions
#error "CONFIG_COMPILER_CXX_EXCEPTIONS no longer matches -fexceptions"
#endif
#ifndef CLANG_TIDY // clang-tidy parses Xtensa with a 64 bit host target
// --undefined=_Znwj in __init__.py relies on this mangling
static_assert(std::is_same_v<std::size_t, unsigned int>, "update --undefined=_Znwj");
#endif
namespace esphome::esp32 {} // namespace esphome::esp32
namespace {