mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
For additional compatibility this adds REDIS_CFLAGS and REDIS_LDFLAGS support to MAKEFILE (#66)
This resolves (1.viii) from https://github.com/valkey-io/valkey/issues/43 > REDIS_FLAGS will be updated to SERVER_FLAGS. Maybe we should also allow REDIS_FLAGS -> SERVER_FLAGS as well, for an extra layer of compatibility. --------- Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
This commit is contained in:
parent
289eb47eb9
commit
3ab066f710
16
src/Makefile
16
src/Makefile
@ -1,12 +1,12 @@
|
||||
# Redis Makefile
|
||||
# Valkey Makefile
|
||||
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
# This file is released under the BSD license, see the COPYING file
|
||||
#
|
||||
# The Makefile composes the final FINAL_CFLAGS and FINAL_LDFLAGS using
|
||||
# what is needed for Redis plus the standard CFLAGS and LDFLAGS passed.
|
||||
# what is needed for Valkey plus the standard CFLAGS and LDFLAGS passed.
|
||||
# However when building the dependencies (Jemalloc, Lua, Hiredis, ...)
|
||||
# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass
|
||||
# flags only to be used when compiling / linking Redis itself SERVER_CFLAGS
|
||||
# flags only to be used when compiling / linking Valkey itself SERVER_CFLAGS
|
||||
# and SERVER_LDFLAGS are used instead (this is the case of 'make gcov').
|
||||
#
|
||||
# Dependencies are stored in the Makefile.dep file. To rebuild this file
|
||||
@ -76,7 +76,7 @@ ifeq ($(uname_S),Linux)
|
||||
MALLOC=jemalloc
|
||||
endif
|
||||
|
||||
# To get ARM stack traces if Redis crashes we need a special C flag.
|
||||
# To get ARM stack traces if Valkey crashes we need a special C flag.
|
||||
ifneq (,$(filter aarch64 armv%,$(uname_M)))
|
||||
CFLAGS+=-funwind-tables
|
||||
endif
|
||||
@ -122,6 +122,14 @@ endif
|
||||
# Override default settings if possible
|
||||
-include .make-settings
|
||||
|
||||
# For added compatibility REDIS_CFLAGS and REDIS_LDFLAGS are also supported.
|
||||
ifdef REDIS_CFLAGS
|
||||
SERVER_CFLAGS := $(REDIS_CFLAGS)
|
||||
endif
|
||||
ifdef REDIS_LDFLAGS
|
||||
SERVER_LDFLAGS := $(REDIS_LDFLAGS)
|
||||
endif
|
||||
|
||||
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS)
|
||||
FINAL_LDFLAGS=$(LDFLAGS) $(OPT) $(SERVER_LDFLAGS) $(DEBUG)
|
||||
FINAL_LIBS=-lm
|
||||
|
Loading…
Reference in New Issue
Block a user