rust/mk
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
..
cfg Splits Android NDK path configuration. 2015-07-28 19:21:04 +12:00
clean.mk Remove morestack support 2015-08-10 16:35:44 -07:00
crates.mk Remove morestack support 2015-08-10 16:35:44 -07:00
ctags.mk Update the ctags rules and targets. 2015-07-30 06:35:42 +10:00
debuggers.mk debuginfo: Create common debugger pretty printer module. 2015-05-30 20:06:08 +02:00
dist.mk mk: Don't build compiler-docs before installation. #25699 2015-05-22 13:02:52 -07:00
docs.mk rename TARPL to The Rustinomicon 2015-08-03 11:22:08 -07:00
grammar.mk Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08:00
host.mk mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
install.mk configure: Remove obsolete --disable-verify option 2015-04-08 12:16:47 -07:00
llvm.mk mk: Add the ability to depend on native LLVM tools 2015-05-19 10:53:04 -07:00
main.mk Remove morestack support 2015-08-10 16:35:44 -07:00
perf.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
platform.mk trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
prepare.mk Replace nop hack, explain substitution reasoning 2015-06-13 17:27:12 +01:00
reconfig.mk mk: Fix reconfiguring top-level ./configure 2015-06-17 17:32:11 -07:00
rt.mk Remove morestack support 2015-08-10 16:35:44 -07:00
rustllvm.mk trans: Use LLVM's writeArchive to modify archives 2015-07-10 09:06:21 -07:00
snap.mk mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
stage0.mk mk/stage0: complain instead of creating an empty file 2014-11-20 16:00:12 -05:00
target.mk trans: Stop informing LLVM about dllexport 2015-08-10 18:20:42 -07:00
tests.mk rename TARPL to The Rustinomicon 2015-08-03 11:22:08 -07:00
util.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00