1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-13 09:39:13 +03:00

Disable C++ exceptions

mold itself doesn't use C++ exceptions, so we can disable C++ exceptions.
Passing `-fno-exceptions` to g++/clang++ makes them to produce smaller code.
This commit is contained in:
Rui Ueyama 2021-10-08 14:59:36 +09:00
parent 8ecb117997
commit 45fdfd4e87

View File

@ -8,7 +8,9 @@ endif
OS ?= $(shell uname -s)
CPPFLAGS = -pthread -std=c++20 -fPIE -DMOLD_VERSION=\"0.9.6\" $(EXTRA_CPPFLAGS)
CPPFLAGS = -pthread -std=c++20 -fPIE -DMOLD_VERSION=\"0.9.6\" \
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables \
$(EXTRA_CPPFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
LIBS = -pthread -lz -lxxhash -ldl -lm