1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00

Build mold as a static executable by default

This commit is contained in:
Rui Ueyama 2021-05-17 20:41:32 +09:00
parent 976e2ed525
commit 8467684f97

View File

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