From 3c4dd1c9f16872d43116888552d44ad121e5c71c Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Thu, 6 Aug 2015 15:16:54 +0000 Subject: [PATCH] Fix link error on Windows when LIBOMP_USE_DEBUGGER is off Two symbols for the external debugger support were incorrectly exported when LIBOMP_USE_DEBUGGER=off. Differential Revision: http://reviews.llvm.org/D11763 llvm-svn: 244217 --- openmp/runtime/cmake/LibompHandleFlags.cmake | 1 + openmp/runtime/src/dllexports | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake index 570ce5c68f2d..6d6a75d9d7c2 100644 --- a/openmp/runtime/cmake/LibompHandleFlags.cmake +++ b/openmp/runtime/cmake/LibompHandleFlags.cmake @@ -212,6 +212,7 @@ function(libomp_get_gdflags gdflags) libomp_append(gdflags_local "-D prof" PROFILE_LIBRARY) libomp_append(gdflags_local "-D stub" STUBS_LIBRARY) libomp_append(gdflags_local "-D HAVE_QUAD" LIBOMP_USE_QUAD_PRECISION) + libomp_append(gdflags_local "-D USE_DEBUGGER" LIBOMP_USE_DEBUGGER) if(${LIBOMP_OMP_VERSION} GREATER 41 OR ${LIBOMP_OMP_VERSION} EQUAL 41) libomp_append(gdflags_local "-D OMP_41") endif() diff --git a/openmp/runtime/src/dllexports b/openmp/runtime/src/dllexports index dd3c3933126b..298ad70af156 100644 --- a/openmp/runtime/src/dllexports +++ b/openmp/runtime/src/dllexports @@ -182,10 +182,10 @@ %endif -#if USE_DEBUGGER + %ifdef USE_DEBUGGER __kmp_debugging DATA __kmp_omp_debug_struct_info DATA -#endif /* USE_DEBUGGER */ + %endif # Symbols for MS mutual detection: _You_must_link_with_exactly_one_OpenMP_library DATA