[all-commits] [llvm/llvm-project] d4638c: Make paths in generated llvm-lit relative as well.

Nico Weber via All-commits all-commits at lists.llvm.org
Mon Apr 6 06:19:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4638cbad7e67ed5be5ac5491c47c3c3d5659953
      https://github.com/llvm/llvm-project/commit/d4638cbad7e67ed5be5ac5491c47c3c3d5659953
  Author: Nico Weber <thakis at chromium.org>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/utils/llvm-lit/CMakeLists.txt

  Log Message:
  -----------
  Make paths in generated llvm-lit relative as well.

This builds on top of D77184. With this, I can rename my build directory
to a different name and `bin/llvm-lit ../llvm-project/clang/test
../llvm-project/llvm/test` still succeeds.

I haven't tried copying the build dir to a different machine to run
tests there yet, but I tried something like it a few months ago and it
worked back then.

Changes:
- Make configure_lit_site_cfg() store the main / generated config pair
  interleaved in the LLVM_LIT_CONFIG_FILES list and postpone converting
  it to python code to llvm-lit's CMakeList.
- Pull the relpath code into a new function make_paths_relative() and
  call that in llvm-lit's CMakeList, prior to converting the list to
  python code.
- Pull the path() function into a variable and use that in llvm-lit's
  CMakeList too.

Differential Revision: https://reviews.llvm.org/D77496




More information about the All-commits mailing list