From 8467684f97e696971ea2653fa144a843ae0691e9 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 17 May 2021 20:41:32 +0900 Subject: [PATCH] Build mold as a static executable by default --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4875a110..c1c4b003 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ MALLOC_LIBDIR=$(CURRENT_DIR)/mimalloc/out/release CPPFLAGS=-g -IoneTBB/include -IxxHash -pthread -std=c++20 \ -Wno-deprecated-volatile -Wno-switch \ -DGIT_HASH=\"$(shell git rev-parse HEAD)\" -LDFLAGS=-L$(TBB_LIBDIR) -Wl,-rpath=$(TBB_LIBDIR) \ +LDFLAGS=-static -fuse-ld=lld -L$(TBB_LIBDIR) -Wl,-rpath=$(TBB_LIBDIR) \ -L$(MALLOC_LIBDIR) -Wl,-rpath=$(MALLOC_LIBDIR) \ -L$(CURRENT_DIR)/xxHash -Wl,-rpath=$(CURRENT_DIR)/xxHash LIBS=-lcrypto -pthread -ltbb -lmimalloc -lz -lxxhash -ldl @@ -24,11 +24,6 @@ else CPPFLAGS += -O2 endif -STATIC ?= 0 -ifeq ($(STATIC), 1) - LDFLAGS += -static -endif - LTO ?= 0 ifeq ($(LTO), 1) CPPFLAGS += -flto -O3