[vte/wip/exceptions-check] build: Add no-exceptions sanity check
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/exceptions-check] build: Add no-exceptions sanity check
- Date: Mon, 14 Oct 2019 19:29:13 +0000 (UTC)
commit ca1b6c5b9bb81d339670a26ef4dc9b0b4e908360
Author: Christian Persch <chpe src gnome org>
Date: Mon Oct 14 21:28:45 2019 +0200
build: Add no-exceptions sanity check
Some distributions pass -fexceptions in a way that overrides vte's
own -fno-exceptions. This is a hard error; fail the build.
See https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/207
src/vteinternal.hh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 9b8caca9..ba14e56a 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -18,6 +18,23 @@
#pragma once
+/* BEGIN sanity checks */
+
+/* Some distributions pass -fexceptions in a way that overrides vte's
+ * own -fno-exceptions. This is a hard error; fail the build.
+ * See https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/207
+ */
+#ifdef __EXCEPTIONS
+#error You CANNOT use -fexceptions to build vte! Fix your build; and DO NOT file a bug upstream!
+#endif
+
+/* While we're at it, check -fno-rtti too */
+#ifdef __GXX_RTTI
+#error You CANNOT use -frtti to build vte! Fix your build system; and DO NOT file a bug upstream!
+#endif
+
+/* END sanity checks */
+
#include <glib.h>
#include "vtedefines.hh"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]