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`
This commit is contained in:
JohnnyB 2023-09-01 13:29:58 +01:00 committed by GitHub
parent 13268c5331
commit 9ee87b4cee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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