Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler-rt] Use locally configured llvm-lit for standalone builds #83178

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

arichardson
Copy link
Member

When building a standalone build with
-DLLVM_CMAKE_DIR=$HOME/output/llvm-install -DCOMPILER_RT_INCLUDE_TESTS=ON, the current code will attempt to use LLVM_DEFAULT_EXTERNAL_LIT which is set to $HOME/output/llvm-install/bin/llvm-lit inside LLVMConfig.cmake even though it is not actually installed. If we are adding the llvm-lit subdirectory, we can use get_llvm_lit_path() immediately afterwards to set LLVM_EXTERNAL_LIT so that subsequent calls within add_lit_testsuite() use llvm-lit from the current build directory instead of the nonexistant one.

When building a standalone build with
`-DLLVM_CMAKE_DIR=$HOME/output/llvm-install -DCOMPILER_RT_INCLUDE_TESTS=ON`,
the current code will attempt to use `LLVM_DEFAULT_EXTERNAL_LIT` which is
set to `$HOME/output/llvm-install/bin/llvm-lit` inside `LLVMConfig.cmake`
even though it is not actually installed. If we are adding the llvm-lit
subdirectory, we can use `get_llvm_lit_path()` immediately afterwards to
set LLVM_EXTERNAL_LIT so that subsequent calls within `add_lit_testsuite()`
use llvm-lit from the current build directory instead of the nonexistant
one.
Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual mechanism isn't very clear to me, but this and the follow-up does make check-asan check-msan ... pass for my standalone build.

@arichardson arichardson merged commit 5e31e82 into llvm:main Feb 27, 2024
6 checks passed
@arichardson arichardson deleted the pr-standalone-lit branch February 27, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants