llvm-project/llvm/utils
John Brawn 3546c2f158 Add auto-exporting of symbols from tools so that plugins work on Windows
The problem with plugins on Windows is that when building a plugin DLL it needs
to explicitly link against something (an exe or DLL) if it uses symbols from
that thing, and that thing must explicitly export those symbols. Also there's a
limit of 65535 symbols that can be exported. This means that currently plugins
only work on Windows when using BUILD_SHARED_LIBS, and that doesn't work with
MSVC.

This patch adds an LLVM_EXPORT_SYMBOLS_FOR_PLUGINS option, which when enabled
automatically exports from all LLVM tools the symbols that a plugin could want
to use so that a plugin can link against a tool directly. Plugins can specify
what tool they link against by using PLUGIN_TOOL argument to llvm_add_library.
The option can also be enabled on Linux, though there all it should do is
restrict the set of symbols that are exported as by default all symbols are
exported.

This option is currently OFF by default, as while I've verified that it works
with MSVC, linux gcc, and cygwin gcc, I haven't tried mingw gcc and I have no
idea what will happen on OSX. Also unfortunately we can't turn on
LLVM_ENABLE_PLUGINS when the option is ON as bugpoint-passes needs to be
loaded by both bugpoint.exe and opt.exe which is incompatible with this
approach. Also currently clang plugins don't work with this approach, which
will be fixed in future patches.

Differential Revision: http://reviews.llvm.org/D18826

llvm-svn: 270839
2016-05-26 11:16:43 +00:00
..
FileCheck Reapply r262092: [FileCheck] Abort if -NOT is combined with another suffix. 2016-02-29 22:13:03 +00:00
KillTheDoctor Modernize to range-based loop 2016-01-07 07:58:25 +00:00
LLVMVisualizers Add natvis visualizers for endian types. 2016-04-21 20:58:41 +00:00
Misc Delete mergefunctions.clang.svn.patch 2016-04-12 19:44:40 +00:00
PerfectShuffle Remove autoconf support 2016-01-26 21:29:08 +00:00
TableGen TableGen: Use StringRef instead of std::string 2016-05-25 18:07:40 +00:00
Target/ARM
abtest abtest: Cleanup, improve comments 2016-03-26 04:07:55 +00:00
bugpoint
count Remove autoconf support 2016-01-26 21:29:08 +00:00
crosstool
emacs Cleaning up LLVM IR mode for Emacs. 2015-09-10 13:44:28 +00:00
fpcmp Remove autoconf support 2016-01-26 21:29:08 +00:00
git
git-svn
jedit Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
kate Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
lint
lit [lit] Add %:[STpst] to represent paths without colons on Windows. 2016-04-30 21:32:12 +00:00
llvm-build llvm-config: Add preliminary Windows support 2016-02-09 19:41:14 +00:00
llvm-lit Remove autoconf support 2016-01-26 21:29:08 +00:00
not Remove autoconf support 2016-01-26 21:29:08 +00:00
release Remove LLVM_ENABLE_TIMESTAMPS 2016-05-05 19:57:03 +00:00
testgen
textmate
unittest Avoid linking LLVM component libraries with libLLVM 2016-02-12 01:42:43 +00:00
valgrind
vim vim: add swiftcc keyword 2016-04-19 02:04:01 +00:00
yaml-bench Remove autoconf support 2016-01-26 21:29:08 +00:00
DSAclean.py
DSAextract.py
GenLibDeps.pl Remove bit-rotten CppBackend. 2016-05-05 14:35:40 +00:00
GetRepositoryPath
GetSourceVersion
LLVMBuild.txt
UpdateCMakeLists.pl
bisect
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
extract_symbols.py Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-native-gxx
llvm.grm
llvmdo
llvmgrep
makellvm
schedcover.py [MISched] Python script to check coverage of misched info 2015-10-12 08:50:47 +00:00
shuffle_fuzz.py [Utils] Updated shuffle fuzz script to generate more modern (valid) IR. 2015-11-22 16:04:32 +00:00
sort_includes.py
test_debuginfo.pl
update_llc_test_checks.py don't hardcode the name of the llc checks script 2016-03-24 17:30:38 +00:00
update_test_checks.py fixed to discard earlier advertising 2016-04-05 19:50:21 +00:00
wciia.py