[LinkerWrapper] Fix passing `-rpath` directly to clang
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 1 Feb 2023 18:01:44 +0000 (12:01 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 1 Feb 2023 18:03:03 +0000 (12:03 -0600)
commit51ff5481146475afc869cf54ebc0b46d9da15a14
tree6170fa56bef5bd7552d4d2ae55e83e82225592b8
parentc8eff9560fc1d2462a60bccb560a9ef87a4ba5bb
[LinkerWrapper] Fix passing `-rpath` directly to clang

Summary:
This code passed the value of `-rpath` directly to the clang invocation.
If we're using the linker then it'll be fine. However, if the linker is
`gcc` as is the case when doing `-fopenmp-targets=x86_64` then this will
cause problems.  This patch adds the `-Wl,-rpath,` to feed it to the
linker correctly.
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp