Open
Description
When running the test-suite after a 3 stage build, if the offload
runtime is enabled (tested with host offloading only), all test related to offloading fails with error of the type described in:
- enhance
LLVM
easyblock for compilation of clang/flang + other llvm-projects easybuilders/easybuild-easyblocks#3373 (comment) - [offload] [cmake] Standalone build test logic is broken #90333
I am unsure if I am doing something wrong in my build setup, but in case this is an actual bug, I was able to fix it by applying the patch in:
Description of the changes:
- offload/CMakeLists.txt: Required to add
-fopenmp
to thetest_openmp_flags
in the respectivelit.cfg
file - offload/test/lit.cfg: Required to add the correct include path to:
- the
omp.h
header asomp_header_directory
(LIBOMPTARGET_OPENMP_HEADER_FOLDER
) are not being set- This should probably be solved in the
CMakeLists.txt
but I am not sure if it is as straightforward as copying the old lines fromopenmp/runtime
as I assumeCMAKE_CURRENT_BINARY_DIR
is not gonna be the same when run from theoffload
dir.
- This should probably be solved in the
- Use the correct target: the offload tests will set the target to
x86_64-pc-linux-gnu
even if the default target for the clang compilation isx86_64-unknown-linux-gnu
. If the correct target is not set the tests will fail for not finding theclang_rt.builtins.a
fileld.lld: error: cannot open /home/crivella/.local/easybuild/build/LLVM/19.1.1/system-system/llvm.obj.3/lib/clang/19/lib/x86_64-pc-linux-gnu/libclang_rt.builtins.a: No such file or directory
- I am unsure if the way this is implemented would be able to catch all triples provided by config.guess beyond the x86_64 archs.
- the
- offload/test/lit.site.cfg.in: Same as last point in order to pass
config.host_triple
to thelit.cfg
file in order to check the currently set host triple vs the tested openmp_target