This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix LIBOMP_USE_DEBUGGER=ON build (PR38612)
ClosedPublic

Authored by lebedev.ri on Dec 17 2018, 12:09 PM.

Details

Summary

Two things:

  1. Those two variables had the wrong sigdness, which was resulting in "sign mismatch in comparison" warning.
  2. The whole kmp_debugger.cpp wasn't being built, or rather, it was being built as-if USE_DEBUGGER was off, thus, nothing provided the definition of __kmp_omp_debug_struct_info, __kmp_debugging. Makes sense, because USE_DEBUGGER is set in kmp_config.h, which is not included explicitly. It is included by kmp.h, but that one is only included inside of the #if USE_DEBUGGER block.. I *think* this is the only source file with this issue, everything else seem to #include either kmp.h or kmp_config.h. The alternative solution would be to add add_compile_options(-include kmp_config.h) in CMake.

I did verify that __kmp_omp_debug_struct_info becomes available with this patch.

Fixes PR38612.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

lebedev.ri created this revision.Dec 17 2018, 12:09 PM
This revision is now accepted and ready to land.Jan 10 2019, 7:23 AM

LGTM

Thank you for the review.

This revision was automatically updated to reflect the committed changes.