rust/src
Alex Crichton e648c96c5f trans: Stop informing LLVM about dllexport
Rust's current compilation model makes it impossible on Windows to generate one
object file with a complete and final set of dllexport annotations. This is
because when an object is generated the compiler doesn't actually know if it
will later be included in a dynamic library or not. The compiler works around
this today by flagging *everything* as dllexport, but this has the drawback of
exposing too much.

Thankfully there are alternate methods of specifying the exported surface area
of a dll on Windows, one of which is passing a `*.def` file to the linker which
lists all public symbols of the dynamic library. This commit removes all
locations that add `dllexport` to LLVM variables and instead dynamically
generates a `*.def` file which is passed to the linker. This file will include
all the public symbols of the current object file as well as all upstream
libraries, and the crucial aspect is that it's only used when generating a
dynamic library. When generating an executable this file isn't generated, so all
the symbols aren't exported from an executable.

To ensure that statically included native libraries are reexported correctly,
the previously added support for the `#[linked_from]` attribute is used to
determine the set of FFI symbols that are exported from a dynamic library, and
this is required to get the compiler to link correctly.
2015-08-10 18:20:42 -07:00
..
compiler-rt@58ab642c30
compiletest trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
doc syntax: Add a new unstable #[linked_from] attribute 2015-08-10 18:20:00 -07:00
driver
error-index-generator
etc
grammar
jemalloc@e24a1a025a
liballoc
libarena
libbacktrace
libcollections
libcollectionstest
libcore
libcoretest
libflate
libfmt_macros
libgetopts
libgraphviz
liblibc
liblog
librand
librbml
librustc trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
librustc_back Remove morestack support 2015-08-10 16:35:44 -07:00
librustc_bitflags
librustc_borrowck
librustc_data_structures
librustc_driver
librustc_lint
librustc_llvm trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
librustc_privacy Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton 2015-08-10 20:24:06 +00:00
librustc_resolve Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton 2015-08-10 20:24:06 +00:00
librustc_trans trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
librustc_typeck
librustc_unicode
librustdoc Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton 2015-08-10 20:24:06 +00:00
libserialize
libstd Auto merge of #27338 - alexcrichton:remove-morestack, r=brson 2015-08-10 23:40:54 +00:00
libsyntax syntax: Add a new unstable #[linked_from] attribute 2015-08-10 18:20:00 -07:00
libterm
libtest
llvm@874dc4ee4c
rt Remove morestack support 2015-08-10 16:35:44 -07:00
rust-installer@c37d3747da
rustbook
rustllvm Remove morestack support 2015-08-10 16:35:44 -07:00
test trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
snapshots.txt