Page MenuHomePhabricator

[llvm][cmake] Make `llvm_install_symlink` robust to absolute dirs.
Needs ReviewPublic

Authored by Ericson2314 on Apr 22 2021, 8:09 AM.

Details

Summary

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.

There are still some issues with dowstream packages using LLVM_TOOLS_INSTALL_DIR which also may be absolute and just for LLVM proper, but that will be addressed in a future commit.

Diff Detail

Unit TestsFailed

TimeTest
0 msx64 debian > libomptarget.mapping::declare_mapper_nested_default_mappers_array.cpp
Script: -- : 'RUN: at line 1'; echo ignored-command

Event Timeline

Ericson2314 created this revision.Apr 22 2021, 8:09 AM
Ericson2314 requested review of this revision.Apr 22 2021, 8:09 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 22 2021, 8:09 AM
  1. Updating D101070: Make llvm_install_symlink robust with respect to absolute dirs. #
  2. Enter a brief description of the changes included in this update.
  3. The first line is used as subject, next lines as comment. #
  4. If you intended to create a new revision, use:
  5. $ arc diff --create

rebase

Herald added a project: Restricted Project. · View Herald TranscriptDec 27 2021, 1:50 PM

Much simpler now

Code taken from D99484 and then to D117419 and now to here.

Ericson2314 edited the summary of this revision. (Show Details)Jan 20 2022, 2:25 PM
Ericson2314 retitled this revision from Make `llvm_install_symlink` robust with respect to absolute dirs. to [llvm][cmake] Make `llvm_install_symlink` robust to absolute dirs..Jan 20 2022, 6:08 PM

Continuing my bisect of D99484 (since this change was in there at the time it was approved, but failing) I will land this one next.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 20 2022, 6:11 PM
This revision was automatically updated to reflect the committed changes.
Ericson2314 reopened this revision.Jan 20 2022, 6:51 PM

This seems to be the part of D99484 that wasn't working.