mirror of
https://github.com/redis/redis.git
synced 2026-01-14 04:38:09 -05:00
Fixes #8825 We're using the fast_float library[1] in our (compiled-in) floating-point fast_float_strtod implementation for faster and more portable parsing of 64 decimal strings. The single file fast_float.h is an amalgamation of the entire library, which can be (re)generated with the amalgamate.py script (from the fast_float repository) via the command: ``` python3 ./script/amalgamate.py --license=MIT > $REDIS_SRC/deps/fast_float/fast_float.h ``` [1]: https://github.com/fastfloat/fast_float The used commit from fast_float library was the one from https://github.com/fastfloat/fast_float/releases/tag/v3.10.1 --------- Co-authored-by: fcostaoliveira <filipe@redis.com>
25 lines
599 B
Makefile
25 lines
599 B
Makefile
# Fallback to gcc/g++ when $CC or $CXX is not in $PATH.
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
|
|
CFLAGS=-Wall -O3
|
|
# This avoids loosing the fastfloat specific compile flags when we override the CFLAGS via the main project
|
|
FASTFLOAT_CFLAGS=-std=c++11 -DFASTFLOAT_ALLOWS_LEADING_PLUS
|
|
LDFLAGS=
|
|
|
|
libfast_float: fast_float_strtod.o
|
|
$(AR) -r libfast_float.a fast_float_strtod.o
|
|
|
|
32bit: CFLAGS += -m32
|
|
32bit: LDFLAGS += -m32
|
|
32bit: libfast_float
|
|
|
|
fast_float_strtod.o: fast_float_strtod.cpp
|
|
$(CXX) $(CFLAGS) $(FASTFLOAT_CFLAGS) -c fast_float_strtod.cpp $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -f *.o
|
|
rm -f *.a
|
|
rm -f *.h.gch
|
|
rm -rf *.dSYM
|