This is an archive of the discontinued LLVM Phabricator instance.

Make paths in generated llvm-lit relative as well.
ClosedPublic

Authored by thakis on Apr 5 2020, 6:33 AM.

Details

Summary

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.

Diff Detail

Event Timeline

thakis created this revision.Apr 5 2020, 6:33 AM
thakis edited the summary of this revision. (Show Details)Apr 5 2020, 10:24 AM
hans accepted this revision.Apr 6 2020, 1:06 AM

Seems okay to me.

llvm/cmake/modules/AddLLVM.cmake
1430

Would it be possible to not lower-case paths in the first place?

This revision is now accepted and ready to land.Apr 6 2020, 1:06 AM
thakis marked an inline comment as done.Apr 6 2020, 6:20 AM

Thanks!

llvm/cmake/modules/AddLLVM.cmake
1430

Yes, I'd like to try to do that next. There's a bit of history here (git log -Snormcase llvm/utils/lit) so maybe it's not super easy. OTOH the original workaround was for a fairly old MSVC, so maybe it's better now.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 6:28 AM
thakis added a comment.Apr 6 2020, 8:07 AM

Fixed the first one in 2e1afe5232674cab6edf1efefd0c8c88fb63a594

The other 2 look kind of unrelated; are you sure they're due to this change?

broadwaylamb added a comment.EditedApr 6 2020, 8:10 AM

Thanks!

The other 2 look kind of unrelated; are you sure they're due to this change?

Pretty sure. The error message in CMake is the same.

P. S. And I can see they're green again after your fix :-)

thakis added a comment.Apr 6 2020, 8:25 AM

Pretty sure. The error message in CMake is the same.

P. S. And I can see they're green again after your fix :-)

Glad to hear the change fixed the other two bots too :)