Skip to content

Commit

Permalink
Merge pull request #498 from vprover/michael-no-rtti
Browse files Browse the repository at this point in the history
turn off run-time type information
  • Loading branch information
MichaelRawson authored Oct 30, 2023
2 parents 61ac540 + 2b244c5 commit d06e09b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang$)
add_compile_options(-Wall)
# we don't use multithreading in (mainline!) Vampire
add_compile_options(-fno-threadsafe-statics)
# ...or RTTI
add_compile_options(-fno-rtti)
# enable standards-compliant standard library with sized operator delete
add_compile_options(-fsized-deallocation)
endif()
Expand Down
3 changes: 1 addition & 2 deletions Indexing/RequestedIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class RequestedIndex final
ASS(!_indexManager);
_indexManager = indexManager;
_type = type;
_index = dynamic_cast<Index*>(_indexManager->request(type));
ASS(_index != nullptr); // if this fails, the wrong index type was requested
_index = static_cast<Index*>(_indexManager->request(type));
}

// NOTE: release() might be called multiple times (manually and by destructor)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ endif
################################################################

CXX = g++
CXXFLAGS = $(XFLAGS) -Wall -fno-threadsafe-statics -std=c++14 $(INCLUDES) # -Wno-unknown-warning-option for clang
CXXFLAGS = $(XFLAGS) -Wall -fno-threadsafe-statics -fno-rtti -std=c++14 $(INCLUDES) # -Wno-unknown-warning-option for clang

CC = gcc
CCFLAGS = -Wall -O3 -DNDBLSCR -DNLGLOG -DNDEBUG -DNCHKSOL -DNLGLPICOSAT
Expand Down

0 comments on commit d06e09b

Please sign in to comment.