Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ endif
# C++ compiler
CXX ?= clang++

# OS detection
SYS := $(shell $(CXX) -dumpmachine)

# Build artifact directories
OBJDIR := .build/objs
DEPDIR := .build/deps
Expand Down Expand Up @@ -132,7 +135,11 @@ LDFLAGS :=

# Remove unreferenced sections
ifeq ($(UNUSED),1)
LDFLAGS += -Wl,--gc-sections
ifneq (,$(findstring darwin,$(SYS)))
LDFLAGS += -Wl,-dead_strip
else
LDFLAGS += -Wl,--gc-sections
endif
endif

# Enable link-time optimizations if request.
Expand Down