mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Pass -flto flag to the linker (#11350)
Currently, we add -flto to the compile flags only. We are supposed to add it to the linker flags as well. Clang build fails because of this. Added a change to add -flto to REDIS_CFLAGS and REDIS_LDFLAGS if the build optimization flag is -O3. (noopt build will not use -flto)
This commit is contained in:
parent
663fbd3459
commit
b08ebff31f
@ -15,7 +15,11 @@
|
||||
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
||||
OPTIMIZATION?=-O3 -flto
|
||||
OPTIMIZATION?=-O3
|
||||
ifeq ($(OPTIMIZATION),-O3)
|
||||
REDIS_CFLAGS+=-flto
|
||||
REDIS_LDFLAGS+=-flto
|
||||
endif
|
||||
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram
|
||||
NODEPS:=clean distclean
|
||||
|
||||
|
@ -1573,9 +1573,9 @@ REDIS_STATIC void *_quicklistSaver(unsigned char *data, size_t sz) {
|
||||
* Returns malloc'd value from quicklist */
|
||||
int quicklistPop(quicklist *quicklist, int where, unsigned char **data,
|
||||
size_t *sz, long long *slong) {
|
||||
unsigned char *vstr;
|
||||
size_t vlen;
|
||||
long long vlong;
|
||||
unsigned char *vstr = NULL;
|
||||
size_t vlen = 0;
|
||||
long long vlong = 0;
|
||||
if (quicklist->count == 0)
|
||||
return 0;
|
||||
int ret = quicklistPopCustom(quicklist, where, &vstr, &vlen, &vlong,
|
||||
|
@ -1028,7 +1028,7 @@ unsigned char *zzlDelete(unsigned char *zl, unsigned char *eptr) {
|
||||
unsigned char *zzlInsertAt(unsigned char *zl, unsigned char *eptr, sds ele, double score) {
|
||||
unsigned char *sptr;
|
||||
char scorebuf[MAX_D2STRING_CHARS];
|
||||
int scorelen;
|
||||
int scorelen = 0;
|
||||
long long lscore;
|
||||
int score_is_long = double2ll(score, &lscore);
|
||||
if (!score_is_long)
|
||||
|
Loading…
Reference in New Issue
Block a user