Skip to content

[offload] [test-suite] 19.1.1 Bug in the test-suite for the offload runtime #112210

Open
@Crivella

Description

@Crivella

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:

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 the test_openmp_flags in the respective lit.cfg file
  • offload/test/lit.cfg: Required to add the correct include path to:
    • the omp.h header as omp_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 from openmp/runtime as I assume CMAKE_CURRENT_BINARY_DIR is not gonna be the same when run from the offload dir.
    • 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 is x86_64-unknown-linux-gnu. If the correct target is not set the tests will fail for not finding the clang_rt.builtins.a file
      ld.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.
  • offload/test/lit.site.cfg.in: Same as last point in order to pass config.host_triple to the lit.cfg file in order to check the currently set host triple vs the tested openmp_target

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions