]> git.sesse.net Git - stockfish/commitdiff
Compile without exceptions
authorStéphane Nicolet <cassio@free.fr>
Tue, 28 Nov 2017 15:50:31 +0000 (16:50 +0100)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Sun, 3 Dec 2017 11:30:09 +0000 (12:30 +0100)
Add the -fno-exceptions flag to the Makefile to avoid the unecessary exceptions support in the executable (we do not use any exception in Stockfish at the moment).

This change gives a 9.2% reduction in size for the executable binary.

Before : executable size = 376956 bytes
After: executable size = 347652 bytes

No functional change.

src/Makefile

index d9a9b54b3f9c07a28134e00c54d76a3b77effa4b..f77db2b61a0b3570c18d6ea5952a23e8aa6388d6 100644 (file)
@@ -141,7 +141,7 @@ endif
 
 ### 3.1 Selecting compiler (default = gcc)
 
-CXXFLAGS += -Wall -Wcast-qual -std=c++11 $(EXTRACXXFLAGS)
+CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++11 $(EXTRACXXFLAGS)
 DEPENDFLAGS += -std=c++11
 LDFLAGS += $(EXTRALDFLAGS)