]> git.lizzy.rs Git - rust.git/commit
rip out link guards
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 24 Mar 2016 14:03:22 +0000 (10:03 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 25 Mar 2016 18:07:20 +0000 (14:07 -0400)
commit4c527457f147881dc864b8b737c4288540b32208
tree10c7f992cfb8f0f35eacacf50cabf16cbc6214ec
parentb385ce12232a6c192b168b75ec9867a5a83d2036
rip out link guards

As discussed in
https://github.com/rust-lang/rust/pull/32293#issuecomment-200597130,
adding link guards are a heuristic that is causing undue complications:

- the link guards inject extra public symbols, which is not always OK.
- link guards as implemented could be a non-trivial performance hit,
  because no attempt is made to "de-duplicate" the dependency graph,
  so at worst you have O(N!) calls to the link guard functions.

Nonetheless, link guards are very helpful in detecting errors, so it may
be worth adding them back in some modified form in the future.
src/librustc_trans/back/linker.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/link_guard.rs [deleted file]
src/librustc_trans/trans/mod.rs