Skip to content

Commit

Permalink
use gold linker on linux
Browse files Browse the repository at this point in the history
This reduces the build-time of bin/sdc by 30% on my machine
  • Loading branch information
UplinkCoder committed Jan 27, 2016
1 parent c235caa commit 1554fe5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ addons:
- libedit2
- libedit-dev
- g++-4.9
- binutils-gold

# install lit from PyPi and make sure it works, compile FileCheck and install in ./tests/ir
install:
Expand Down
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ endif
LDFLAGS += $(LIBD_LIB) -lphobos2 $(LLVM_LIB)

ifeq ($(PLATFORM),Linux)
LD_GOLD = $(shell which ld.gold | xargs basename)
ifeq ($(LD_GOLD),ld.gold)
LDFLAGS += -fuse-ld=gold
endif
LDFLAGS += -lstdc++ -export-dynamic
NASMFLAGS += -f elf64
endif
Expand Down

0 comments on commit 1554fe5

Please sign in to comment.