[Openmp-commits] [openmp] 2639625 - [OpenMP] Solve potential VERSION script error w/ OMPT symbols

JP Lehr via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 3 13:47:22 PST 2023


Author: JP Lehr
Date: 2023-01-03T16:47:12-05:00
New Revision: 263962545daef2973cf41ad71718c1d1653d58da

URL: https://github.com/llvm/llvm-project/commit/263962545daef2973cf41ad71718c1d1653d58da
DIFF: https://github.com/llvm/llvm-project/commit/263962545daef2973cf41ad71718c1d1653d58da.diff

LOG: [OpenMP] Solve potential VERSION script error w/ OMPT symbols

The patch adds the symbols if OMPT_SUPPORT is not defined.
Github issue: https://github.com/llvm/llvm-project/issues/59660

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D140591

Added: 
    

Modified: 
    openmp/runtime/src/kmp_utility.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_utility.cpp b/openmp/runtime/src/kmp_utility.cpp
index 53ff1788a074b..3174bbb7a5b75 100644
--- a/openmp/runtime/src/kmp_utility.cpp
+++ b/openmp/runtime/src/kmp_utility.cpp
@@ -403,3 +403,16 @@ void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) {
 
   *pos = '\0';
 }
+
+#if !OMPT_SUPPORT
+extern "C" {
+typedef struct ompt_start_tool_result_t ompt_start_tool_result_t;
+// Define symbols expected by VERSION script
+ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version,
+                                          const char *runtime_version) {
+  return nullptr;
+}
+
+void ompt_libomp_connect(ompt_start_tool_result_t *result) { result = nullptr; }
+}
+#endif


        


More information about the Openmp-commits mailing list