Always use -Xlinker for -rpath
authorBartosz Nitka <niteria@gmail.com>
Sat, 21 Jan 2017 17:59:55 +0000 (09:59 -0800)
committerBartosz Nitka <niteria@gmail.com>
Sat, 21 Jan 2017 18:00:12 +0000 (10:00 -0800)
commitf9ccad236fa6042a3abbb655129f47fe9dadceaf
treeded82c41ef05fe429cbabee10ae730795e5774bc
parent15b9a85ef03e2729d487a6f8460be8880c797609
Always use -Xlinker for -rpath

Currently we use `-Wl` which takes a list of
comma-separated options. Unfortunately that
breaks when you use it with `-rpath` and
a path that has commas in them.
Buck, the build system, produces paths with
commas in them.

`-Xlinker` doesn't have this disadvantage
and as far as I can tell is supported by
both `gcc` and `clang`. Anecdotally `nvcc`
supports `-Xlinker`, but not `-Wl`.

Test Plan: ./validate, harbourmaster

Reviewers: nomeata, simonmar, austin, bgamari, hvr

Reviewed By: simonmar, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2971
compiler/ghci/Linker.hs
compiler/main/DriverPipeline.hs
compiler/main/SysTools.hs
testsuite/driver/extra_files.py
testsuite/tests/th/TH_linker/Dummy.hs [new file with mode: 0644]
testsuite/tests/th/TH_linker/Main.hs [new file with mode: 0644]
testsuite/tests/th/TH_linker/Makefile [new file with mode: 0644]
testsuite/tests/th/TH_linker/all.T [new file with mode: 0644]
testsuite/tests/th/TH_linker/path_with_commas.stdout [new file with mode: 0644]
testsuite/tests/th/TH_linker/test.pkg [new file with mode: 0644]