[PATCH] D25177: [cmake] Create versioned symlinks on versioned tools

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 01:16:48 PDT 2016


mgorny created this revision.
mgorny added reviewers: beanz, doug.gregor, joerg.
mgorny added a subscriber: llvm-commits.

Create versioned symlink structure when symlinking a tool that has
the VERSION property set (e.g. clang).

Currently, if symlink target had version set, CMake created symlink from
non-versioned name to the versioned name implicitly and we created
additional symlinks to the non-versioned name. For example:

  clang -> clang-4.0
  clang++ -> clang
  ...

With this patch, a versioned symlink that points to the versioned (real)
executable is created first, and a non-versioned symlink to
the versioned symlink is created afterwards. The resulting structure
becomes:

  clang++-4.0 -> clang-4.0
  clang -> clang-4.0
  clang++ -> clang++-4.0
  ...

As a result, this improves consistency between the symlinks and makes it
easier to maintain multiple versions of clang installed on the same
system. In particular, after installing a new version the 'bare'
symlinks are clobbered but the versioned symlinks continue to work.


https://reviews.llvm.org/D25177

Files:
  cmake/modules/AddLLVM.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25177.73243.patch
Type: text/x-patch
Size: 5130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/6e9fc3b0/attachment.bin>


More information about the llvm-commits mailing list