I am trying to create a simple Clang plugin and test it on my Windows host with Msys2's mingw x86_64-w64-windows toolchain. The issue is that clang is failing to "find" the plugin after loading
windows plugin dll. Can you please help me to figure out what is wrong here? I am very new to clang and the plugin framework. Thank you for any suggestion, Mark
$ /c/msys64/mingw64/bin/ld --version GNU ld (GNU Binutils) 2.34 Copyright (C) 2020 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.
$ mingw32-make --version GNU Make 4.3 Built for Windows32 Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
Re: Clang Plugin for Msys2's mingw x86_64-w64-windows
clang/LLVM does not support dynamically loaded plugins on Windows. The
reasons are that
1. importing symbols require specifying which binary they are loaded
from. That is, clang.exe, clang++.exe, libLLVM.dll or clang-cpp.dll
2. There is a limit of ~2^16 exported symbols per dll. LLVM alone
already has more symbols.