Skip to content

Commit ccd6bad

Browse files
snicoletmcostalba
authored andcommitted
Compile without exceptions
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.
1 parent 8a5a64e commit ccd6bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ endif
141141

142142
### 3.1 Selecting compiler (default = gcc)
143143

144-
CXXFLAGS += -Wall -Wcast-qual -std=c++11 $(EXTRACXXFLAGS)
144+
CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++11 $(EXTRACXXFLAGS)
145145
DEPENDFLAGS += -std=c++11
146146
LDFLAGS += $(EXTRALDFLAGS)
147147

0 commit comments

Comments
 (0)