This is to address the issue reported at:
https://bugs.llvm.org/show_bug.cgi?id=46863
From my understanding, the issue is that these omp_ symbols want to be both external and weak. Since weak is meaningless for a shared library interface function, this patch disables the attribute, when the OpenMP library is built as shared library.
The situation of ompt_start_tool is different. This is not an interface function, but a function implemented by an OMPT tool. This function needs to be weak if possible to allow overwriting ompt_start_tool with a function implementation built into the application.