Skip to content

Commit

Permalink
Automatically set LITE=1 on passing OPT="-DROCKSDB_LITE" (facebook#4671)
Browse files Browse the repository at this point in the history
Summary:
In facebook#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: facebook#4671

Differential Revision: D13033801

Pulled By: sagar0

fbshipit-source-id: e7b506cee574f9e3f42221ee6647915011c78d78
  • Loading branch information
sagar0 authored and facebook-github-bot committed Nov 13, 2018
1 parent 7d04ef4 commit dd742e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dd742e2

Please sign in to comment.