Passing Linker Options with Multiple Arguments using -Xlinker,-Wl, or -Qoption,link

If you are using the compiler driver (icc/icpc/ifort) to link together object files, you may have a need to pass a linker option directly to ld that contains multiple parts, such as "-rpath <dir>".  There are several ways to do this.

1. 
-Xlinker -rpath -Xlinker <dir>

2.
-Wl,-rpath,<dir>

3.
-Qoption,link,-rpath,<dir>
For more complete information about compiler optimizations, see our Optimization Notice.