Only use a rustc wrapper script when ld.gold is available.

Fixes #7247.
This commit is contained in:
Simon Sapin 2015-08-17 09:19:29 +02:00
parent fb7a53c6cf
commit 1dab9294f4
2 changed files with 5 additions and 4 deletions

View file

@ -1,4 +1,2 @@
#!/bin/sh
EXTRA_ARGS=""
which ld.gold > /dev/null 2>&1 && EXTRA_ARGS="-C link-args=-fuse-ld=gold"
rustc $EXTRA_ARGS "$@"
rustc -C link-args=-fuse-ld=gold "$@"