[cmake] Prevent LLVMgold.so from being unloaded on Linux
authorHans Wennborg <hans@hanshq.net>
Thu, 16 Aug 2018 15:12:12 +0000 (15:12 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 16 Aug 2018 15:12:12 +0000 (15:12 +0000)
commit1cc890d14befbd20a2636db282a31d3c099dc9af
tree18ec1b8b7e1b5d42002ad3b55e031c4dab96e6ba
parente32c31af312928a787a4c3882aac6dfa10c12c5a
[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: 339883
llvm/cmake/modules/HandleLLVMOptions.cmake