[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 08:43:12 PDT 2020


hubert.reinterpretcast created this revision.
hubert.reinterpretcast added reviewers: nemanjai, jsji, daltenty, stevewan, jasonliu.
Herald added subscribers: atanasyan, jrtc27, mgorny.
Herald added a project: clang.
hubert.reinterpretcast edited the summary of this revision.

Some target toolchains use more than just a default `--sysroot`, but also include a default `--dyld-prefix` and an implicitly-added `-rpath`.

For example, using a vanilla build of Clang with the IBM Advance Toolchain for Linux on Power would require specifying `--sysroot=/opt/at12.0 --dyld-prefix=/opt/at12.0 -rpath /opt/at12.0/lib64`. The GCC compiler provided with the Advance Toolchain is preconfigured such that adding such options is not necessary. This patch adds the configuration hooks that would allow Clang to be preconfigured similarly.

Note: The `DEFAULT_RPATH` behaviour has only been implemented for "GNU" toolchains.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80300

Files:
  clang/CMakeLists.txt
  clang/include/clang/Config/config.h.cmake
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/fuchsia.c
  clang/test/Driver/fuchsia.cpp
  clang/test/Driver/hurd.c
  clang/test/Driver/linux-ld.c
  clang/test/Driver/mips-mti.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80300.265257.patch
Type: text/x-patch
Size: 21970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200520/66784bd0/attachment-0001.bin>


More information about the cfe-commits mailing list