rust/src/tools
Alex Crichton d69b24805b rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-03 20:21:35 -08:00
..
build-manifest build-manifest: Add powerpc-unknown-linux-gnuspe target 2018-02-26 02:07:24 +01:00
cargo@1d6dfea44f Updated Cargo commit hash 2018-01-26 19:57:02 +02:00
cargotest Update miri to rustc changes 2017-12-06 09:25:29 +01:00
clippy@d5e233a720 Update Clippy 2018-02-23 09:04:16 -08:00
compiletest Rollup merge of #48488 - varkor:handle-gdb-error-compiletest, r=michaelwoerister 2018-02-28 19:15:36 +08:00
error_index_generator Remove hoedown from rustdoc 2018-02-16 23:17:15 +01:00
linkchecker Report errors instead of panic!() 2018-01-12 16:47:58 +02:00
lld@b87873eace rust: Import LLD for linking wasm objects 2018-03-03 20:21:35 -08:00
miri@61833b9aea Update clippy and miri submodule 2018-02-05 11:36:51 +01:00
remote-test-client Add a disabled builder for aarch64 emulated tests 2017-07-24 16:24:52 -07:00
remote-test-server Add remote device testing support 2017-05-04 12:43:22 +02:00
rls@d4f0b29d0c Update RLS 2018-02-28 17:08:09 +13:00
rust-installer@b55e0fc775 Update rust-installer for streaming parallelism 2018-01-16 18:06:32 -08:00
rustbook update mdbook to 0.1.2 2018-02-04 15:47:35 -05:00
rustdoc Cargotest needs only one rustdoc.exe to exist on Windows 2017-08-13 05:15:44 +05:00
rustdoc-js Fix for older JS versions 2018-01-16 15:38:08 +01:00
rustdoc-themes Convert python script to rust 2018-02-08 10:53:09 +01:00
rustfmt@346238f497 Update RLS and Rustfmt 2018-02-04 15:08:54 +13:00
tidy rust: Import LLD for linking wasm objects 2018-03-03 20:21:35 -08:00
unstable-book-gen Enforce dashes in the unstable book file names 2018-01-13 15:44:44 +01:00
publish_toolstate.py Run the external doc tests in tools job. 2018-02-24 00:54:13 +08:00