~rcr/rirc

6e6e6a1d5d1227438c080cf97aa76cc69fd1d79c — Richard Robbins 2 months ago 3677744
fix build script linker flags
2 files changed, 7 insertions(+), 5 deletions(-)

M Makefile
M scripts/build.sh
M Makefile => Makefile +5 -4
@@ 13,15 13,16 @@ include lib/mbedtls.Makefile

CONFIG := config.h

CLFAGS_RIRC += -std=c11 -I. -DVERSION=\"$(VERSION)\"
CLFAGS_RIRC += -D_POSIX_C_SOURCE=200809L
CLFAGS_RIRC += -D_DARWIN_C_SOURCE

CFLAGS ?= -O2 -flto
CFLAGS += -DNDEBUG

CFLAGS_DEBUG ?=
CFLAGS_DEBUG += -O0 -g3 -Wall -Wextra -Werror

CLFAGS_RIRC += -std=c11 -I. -DVERSION=\"$(VERSION)\"
CLFAGS_RIRC += -D_POSIX_C_SOURCE=200809L
CLFAGS_RIRC += -D_DARWIN_C_SOURCE

LDFLAGS_RIRC += -lpthread

LDFLAGS ?= -flto

M scripts/build.sh => scripts/build.sh +2 -1
@@ 9,7 9,8 @@
set -e

export CC=clang
export LDFLAGS="-fuse-ld=lld"
export LDFLAGS="-flto -fuse-ld=lld"
export LDFLAGS_DEBUG="-fuse-ld=lld"

if [ -x "$(command -v entr)" ]; then
	ENTR="entr -c"