<div dir="ltr"><span style="font-size:12.8px">Reposting PR </span><a href="https://llvm.org/bugs/show_bug.cgi?id=31300" target="_blank" style="font-size:12.8px">https://llvm.org/bugs/show_<wbr>bug.cgi?id=31300</a><span style="font-size:12.8px"> to reach a wider audience.  Can you please share any thoughts?</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><pre class="gmail-m_-7934863349185326942gmail-bz_comment_text" id="gmail-m_-7934863349185326942gmail-comment_text_0" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)">Currently, '-fopenmp' just gets translated to the corresponding runtime library (-lomp, -lgomp, -lipmp5) during the link step.  However, this precludes a multilib toolchain from finding the right library based on the target architecture without extra support from the build system.  The sanitizers, for instance, use libclang_rt.<sanitizer>-<arch><wbr>.{so,a}.

To do something similar for OpenMP, we need to
1. change the driver to pass the extended name to the linker.
2. change the CMake build rules to use the extended name instead of libomp.so.

My questions:
1. What is the preferred "full" name?  libomp-<arch>.so sounds reasonable to me.
2. Is the existing behavior preferable to avoid breaking existing code or to support OpenMP runtimes from outside of this project?  If so, I can make the above changes fire only for Android triples.  In this case, we don't need to immediately update CMake build rules.</pre></div></div>