From 9ee87b4cee9b821ff0bc77b54a3f8d2921346f9d Mon Sep 17 00:00:00 2001 From: JohnnyB Date: Fri, 1 Sep 2023 13:29:58 +0100 Subject: [PATCH] Changed assignment clobbering LDFLAGS Assigning LDFLAGS directly wipes out any flags specified by the build pipeline. Is this OK? This way it's much easier to do things like static builds. May consider the same for CFLAGS, etc others also. `LDFLAGS="-static" make -j` --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b56df3d8a..9d33438bd 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,9 @@ OPT = -O3 endif CFLAGS = -I. $(OPT) -std=c11 -fPIC CXXFLAGS = -I. -I./common $(OPT) -std=c++11 -fPIC -LDFLAGS = + +# Changed to += to not wipe out LDFLAGS from the build pipeline. +LDFLAGS += ifdef LLAMA_DEBUG CFLAGS += -O0 -g