From dd742e2416eadff64c330e3b72b4aac009c25100 Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Mon, 12 Nov 2018 16:57:01 -0800 Subject: [PATCH] Automatically set LITE=1 on passing OPT="-DROCKSDB_LITE" (#4671) Summary: In #4652 we are setting -Os for lite builds only when LITE=1 is specified. But currently almost all the users invoke lite build via OPT="-DROCKSDB_LITE=1". So this diff tries to set LITE=1 when users already pass in -DROCKSDB_LITE=1 via the command line. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4671 Differential Revision: D13033801 Pulled By: sagar0 fbshipit-source-id: e7b506cee574f9e3f42221ee6647915011c78d78 --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e23004c9e..53fecf58e 100644 --- a/Makefile +++ b/Makefile @@ -95,9 +95,17 @@ endif # Lite build flag. LITE ?= 0 -ifneq ($(LITE), 0) +ifeq ($(LITE), 0) +ifneq ($(filter -DROCKSDB_LITE,$(OPT)),) + # Be backward compatible and support older format where OPT=-DROCKSDB_LITE is + # specified instead of LITE=1 on the command line. + LITE=1 +endif +else ifeq ($(LITE), 1) +ifeq ($(filter -DROCKSDB_LITE,$(OPT)),) OPT += -DROCKSDB_LITE endif +endif # Figure out optimize level. ifneq ($(DEBUG_LEVEL), 2) -- GitLab