[PATCH] D46521: [llvm] cmake: resolve symlinks in LLVMConfig.cmake

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 01:32:21 PDT 2018


mgorny added a comment.

To add a real use case broken by this: Gentoo prior to 17.1 (which includes most of existing installs) used `/usr/lib -> lib64` symlink.  The canonical LLVM install path for Gentoo is:

  /usr/lib/llvm/X/...

With your patch, CMake wrongly replaces it with:

  /usr/lib64/llvm/X/...

Which means that if it gets written anywhere, it will become broken after upgrading to 17.1.

Realpath is the worst idea anyone might ever have.  It replaces canonical locations with completely unpredictable paths behind user's back.


Repository:
  rL LLVM

https://reviews.llvm.org/D46521





More information about the llvm-commits mailing list