Skip to content

Commit

Permalink
Fixing Makefile related issues failing CI
Browse files Browse the repository at this point in the history
Signed-off-by: Parth Patel <[email protected]>
  • Loading branch information
parthpatel committed Nov 16, 2024
1 parent 2cb45b5 commit 129fdbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions deps/fast_float_c_interface/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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;

8 changes: 3 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/valkey_strtod.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 129fdbf

Please sign in to comment.