From 8c5781666ecca4a2b8a58e97ea7b7c4c0575aa0f Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 5 Dec 2014 21:34:20 -0800 Subject: [PATCH] Add -fno-exceptions flag to ROCKSDB_LITE. Summary: Add -fno-exceptions flag to ROCKSDB_LITE. Test Plan: make OPT=-DROCKSDB_LITE shared_lib -j32 Reviewers: sdong, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D29901 --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index f22ac59c4..1ca41f8fe 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,12 @@ else OPT += -DNDEBUG endif +ifneq ($(filter -DROCKSDB_LITE,$(OPT)),) + # found + CFLAGS += -fno-exceptions + CXXFLAGS += -fno-exceptions +endif + # ASAN doesn't work well with jemalloc. If we're compiling with ASAN, we should use regular malloc. ifdef COMPILE_WITH_ASAN # ASAN compile flags