[PATCH] D77496: Make paths in generated llvm-lit relative as well.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 06:55:50 PDT 2020


thakis created this revision.
thakis added a reviewer: hans.
Herald added a subscriber: mgorny.

This builds on top of D77184 <https://reviews.llvm.org/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`
(mostly) 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.


https://reviews.llvm.org/D77496

Files:
  llvm/cmake/modules/AddLLVM.cmake
  llvm/utils/llvm-lit/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77496.255150.patch
Type: text/x-patch
Size: 7324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200405/78f7dc64/attachment.bin>


More information about the llvm-commits mailing list