From 7f92f7c4dc8e06d6554f93eba4027f4a6009f39c Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Mon, 2 Apr 2018 13:40:26 -0700 Subject: [PATCH] disable exceptions and rtti Signed-off-by: Steven Noonan --- src/meson.build | 8 +++++++- src/public/tier1/utllinkedlist.h | 8 +------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/meson.build b/src/meson.build index fd328d1..26c023f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -29,6 +29,11 @@ flags_common = [ '-fno-strict-aliasing', ] +flags_cxx = [ + '-fno-rtti', + '-fno-exceptions', +] + warn_flags_common = [ '-Wall', #'-Wextra', @@ -56,6 +61,7 @@ cpp_flags = [ '-DHAVE_OPENSSL', '-DENABLE_OPENSSLCONNECTION', '-DCRYPTO_DISABLE_ENCRYPT_WITH_PASSWORD', + '-DGOOGLE_PROTOBUF_NO_RTTI', ] target_os = target_machine.system() @@ -89,7 +95,7 @@ endforeach cxx_flags = [] cxx_flags += cxx_compiler.first_supported_argument(['-std=c++11', '-std=c++0x']) -foreach arg : warn_flags_cxx + flags_common + warn_flags_common +foreach arg : warn_flags_cxx + flags_common + flags_cxx + warn_flags_common if cxx_compiler.has_argument(arg) cxx_flags += [ arg ] endif diff --git a/src/public/tier1/utllinkedlist.h b/src/public/tier1/utllinkedlist.h index 0d33eda..a58b5a2 100644 --- a/src/public/tier1/utllinkedlist.h +++ b/src/public/tier1/utllinkedlist.h @@ -402,13 +402,7 @@ I CUtlLinkedList::AllocInternal( bool multilist ) if ( elem == InvalidIndex() ) { -#if defined(_WIN32) && !defined(GNU_COMPILER) - Error("%s overflow!\n", typeid(*this).raw_name()); -#else -#if ( !defined(_PS3) || defined(_DEBUG) ) - Error("%s overflow!\n", typeid(*this).name()); -#endif -#endif + Error("CUtlLinkedList overflow!\n"); } } else