From d0f500a5961d54f52e7861b1ae9b8149354dcfd0 Mon Sep 17 00:00:00 2001 From: Forst Date: Sat, 25 Apr 2026 01:04:24 +0800 Subject: [PATCH] fix: patch out -Werror in sentry-native for clang-cl 22+ clang-cl 22.1.4 introduces new warnings (-Wc++-keyword, -Wimplicit-void-ptr-cast, -Wpadded) that are promoted to errors by sentry-native's hardcoded -Werror. Patch it out before cmake build. --- deps/sentry-native.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/sentry-native.lua b/deps/sentry-native.lua index 7c9579ee..17f3111f 100644 --- a/deps/sentry-native.lua +++ b/deps/sentry-native.lua @@ -95,6 +95,10 @@ package("sentry-native") end) on_install("windows|x86", "windows|x64", "linux", "macosx|x86_64", function (package) -- TODO: to enable android you will need to figure out the order of libs + -- Patch out -Werror to fix build with newer clang versions (22+) + local sourcedir = path.join(package:cachedir(), "source") + io.replace(path.join(sourcedir, "CMakeLists.txt"), "-Werror", "", {plain = true}) + local opt = {} local configs = {} table.insert(configs, "-DSENTRY_BUILD_EXAMPLES=OFF")