Merging r339883: --------------------------------------------------------------…

Authored by hansw on Aug 17 2018, 12:25 AM.


Merging r339883: ------------------------------------------------------------------------ r339883 | hans | 2018-08-16 17:12:12 +0200 (Thu, 16 Aug 2018) | 10 lines

[cmake] Prevent LLVMgold.so from being unloaded on Linux

Extend the fix from D40459 to also apply to modules such as the LLVM
gold plugin. This is needed because current binutils master (and future
binutils 2.32) calls dlclose() on bfd plugins as part of a recent fix
for https://sourceware.org/bugzilla/show_bug.cgi?id=23460.

Patch by Evangelos Foutras!

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

llvm-svn: 339993