[Openmp-commits] [PATCH] D39801: [OMPT] Provide initialization for Mac OS X

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 8 11:14:49 PST 2017


Hahnfeld added inline comments.


================
Comment at: runtime/src/ompt-general.cpp:124
+_OMP_EXTERN OMPT_WEAK_ATTRIBUTE ompt_start_tool_result_t *
+ompt_start_tool(unsigned int omp_version, const char *runtime_version) {
 #if OMPT_DEBUG
----------------
hbae wrote:
> I think this code now requires LD_DYNAMIC_WEAK to be set in order to override weak symbols (e.g., when libomp.so is linked before tool library).
> We used RTLD_NEXT to avoid this, by making the fallback ompt_start_tool search for the next available symbol.
Thanks, that was the test case and explanation that I was missing. I have readded the code with a comment describing the situation and added a test case for this.

Note that `KMP_DYNAMIC_LIB` is always true and we require `OMPT_HAVE_WEAK_ATTRIBUTE` for Unix systems.


https://reviews.llvm.org/D39801





More information about the Openmp-commits mailing list