Unit tests in compiler-rt not rebuilding with changes to runtimes?

Hi llvm-dev,

I have unit tests set up in the XRay implementation (compiler-rt/lib/xray/tests/unit) following the pattern that the TSAN and other sanitiser unit tests. However, I'm running into the following problem:

When I make changes to the runtime (in this case, XRay) and do `ninja all check-xray`, it seems that the unit tests don't get re-liked to the new version of the runtime.

It could be something obviously that I'm doing wrong here, but does anybody have ideas how to avoid this?

Cheers

-- Dean

I want to make sure I understand the problem so I can try to reproduce it.

When you say "make changes to the runtime" you mean code in compiler-rt/lib/xray ?

Are you using the mono-repo prototype? If not, where do you have compiler-rt's sources (llvm/projects or llvm/runtimes)?

Lastly, can you provide your CMake configuration command line?

Thanks,
-Chris

I want to make sure I understand the problem so I can try to reproduce it.

When you say “make changes to the runtime” you mean code in compiler-rt/lib/xray ?

Yes.

Are you using the mono-repo prototype? If not, where do you have compiler-rt’s sources (llvm/projects or llvm/runtimes)?

Not the mono-repo prototype, I have the compiler-rt sources in llvm/projects/compiler-rt.

Lastly, can you provide your CMake configuration command line?

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -DCMAKE_CXX_COMPILER=clang+±3.9 -DCMAKE_C_COMPILER=clang-3.9 -DCMAKE_ASM_COMPILER=clang-3.9 -DLLVM_USE_LINKER=gold -DLLVM_USE_SPLIT_DWARF=On -DBUILD_SHARED_LIBS=ON -DLLVM_OPTIMIZED_TABLEGEN=On -DCOMPILER_RT_BUILD_XRAY=On -DLLVM_ENABLE_ASSERTIONS=On -DCOMPILER_RT_INCLUDE_TESTS=On -DLLVM_ENABLE_SPHINX=On -DSPHINX_WARNINGS_AS_ERRORS=On -DCMAKE_CXX_FLAGS=“-Wpedantic” -DCMAKE_CXX_COMPILER_LAUNCHER=ccache …/llvm

I’m building in Linux, x86_64.

Cheers

Thanks,
-Chris

Hi llvm-dev,

I have unit tests set up in the XRay implementation (compiler-rt/lib/xray/tests/unit) following the pattern that the TSAN and other sanitiser unit tests. However, I’m running into the following problem:

When I make changes to the runtime (in this case, XRay) and do ninja all check-xray, it seems that the unit tests don’t get re-liked to the new version of the runtime.

It could be something obviously that I’m doing wrong here, but does anybody have ideas how to avoid this?

Cheers

– Dean

– Dean

I’m looking into this.
Could be connected to a CMake refactoring I have done in August.
Unfortunately xray does not work on macOS, so I might have not spotted this issue.

Now noticed another bug: XRay unit-tests do not seem to be run at all, also they do recompile on changes.
Lit tests are still being run.

https://reviews.llvm.org/D38917 should fix both issues: please take a look.