From 129fdbfc3ad7f1c4d8e91f44c2c628f7f616b80c Mon Sep 17 00:00:00 2001 From: Parth Patel <661497+parthpatel@users.noreply.github.com> Date: Sat, 16 Nov 2024 10:01:48 +0000 Subject: [PATCH] Fixing Makefile related issues failing CI Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> --- deps/fast_float_c_interface/Makefile | 6 ++++-- src/Makefile | 8 +++----- src/valkey_strtod.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deps/fast_float_c_interface/Makefile b/deps/fast_float_c_interface/Makefile index 801b5ec3b7..7eaa9a6207 100644 --- a/deps/fast_float_c_interface/Makefile +++ b/deps/fast_float_c_interface/Makefile @@ -16,9 +16,9 @@ OPT?=-O3 CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1')) ifeq ($(OPT),-O3) ifeq (clang,$(CLANG)) - OPTIMIZATION+=-flto + OPT+=-flto else - OPTIMIZATION+=-flto=auto -ffat-lto-objects + OPT+=-flto=auto -ffat-lto-objects endif endif @@ -29,7 +29,9 @@ endif CXXFLAGS=$(STD) $(OPT) $(WARN) -fPIC $(CFLAGS) -D FASTFLOAT_ALLOWS_LEADING_PLUS .PHONY: all clean + all: fast_float_strtod.o + clean: rm -f *.o || true; diff --git a/src/Makefile b/src/Makefile index d3816c8cc6..c9dfc3363e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -429,12 +429,10 @@ ifeq ($(USE_FAST_FLOAT),yes) # valkey_strtod.h uses this flag to switch valkey_strtod function to fast_float_strtod, # therefore let's pass it to compiler for preprocessing. FINAL_CFLAGS += -D USE_FAST_FLOAT - # next, let's add actual library containing fast_float_strtod function for linking. + # next, let's build and add actual library containing fast_float_strtod function for linking. DEPENDENCY_TARGETS += fast_float_c_interface - FAST_FLOAT_STRTOD_OBJECT = ../deps/fast_float_c_interface/fast_float_strtod.o - ENGINE_SERVER_OBJ += $(FAST_FLOAT_STRTOD_OBJECT) - ENGINE_CLI_OBJ += $(FAST_FLOAT_STRTOD_OBJECT) - ENGINE_TEST_OBJ += $(FAST_FLOAT_STRTOD_OBJECT) + FAST_FLOAT_STRTOD_OBJECT := ../deps/fast_float_c_interface/fast_float_strtod.o + FINAL_LIBS += $(FAST_FLOAT_STRTOD_OBJECT) # fast_float_strtod uses functions from c++ std library, so let's add it for linking as well. # Clang uses libc++ for standard c++ library vs libstdc++ used by gcc. ifeq (clang,$(CLANG)) diff --git a/src/valkey_strtod.h b/src/valkey_strtod.h index 861a3977f2..51e7ef58d1 100644 --- a/src/valkey_strtod.h +++ b/src/valkey_strtod.h @@ -8,7 +8,7 @@ * * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #ifndef FAST_FLOAT_STRTOD_H #define FAST_FLOAT_STRTOD_H