[llvm][cmake] Make `install_symlink` workflow work with absolute install dirs
authorJohn Ericson <John.Ericson@Obsidian.Systems>
Fri, 21 Jan 2022 02:54:54 +0000 (02:54 +0000)
committerJohn Ericson <John.Ericson@Obsidian.Systems>
Mon, 25 Jul 2022 21:04:45 +0000 (21:04 +0000)
commit5acd376438a53747c84e38c8b69fc74a270da680
treef2694053fde67c1acf5be8d25fbcb6a2422a42b2
parentac0d1d5c7b7e0d572e35e31e0b59be765ca42a48
[llvm][cmake] Make `install_symlink` workflow work with absolute install dirs

If `CMAKE_INSTALL_BINDIR` is a different absolute path per project, as
it is with NixOS when we install every package to its own prefix, the
old way fails when the absolute path gets prepended with `CMAKE_INSTALL_PREFIX`.

Using `extend_path` from the install-time script isn't really possible, so we just make the caller responsible for making the path absolute instead.

Also fix one stray `bin` -> `CMAKE_INSTALL_BINDIR`

Reviewed By: sebastian-ne

Differential Revision: https://reviews.llvm.org/D101070
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/LLVMInstallSymlink.cmake