]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikic
authorMazdak Farrokhzad <twingoow@gmail.com>
Mon, 29 Jul 2019 00:10:52 +0000 (02:10 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Jul 2019 00:10:52 +0000 (02:10 +0200)
commit778b631ff06c463fad290ea8ff8f2817ab62a5fd
tree45b3e2a9c745e5c6956b9556c011c899285a6bdc
parentc7312fe4ff85ada30103cea58db25d83e0bec4b0
parentdc50a633f3260a3aeb79a4ca9800587be7f732e7
Rollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikic

rustc: Update wasm32 support for LLVM 9

This commit brings in a number of minor updates for rustc's support for
the wasm target which has changed in the LLVM 9 update. Notable updates
include:

* The compiler now no longer manually inserts the `producers` section,
  instead relying on LLVM to do so. LLVM uses the `llvm.ident` metadata
  for the `processed-by` directive (which is now emitted on the wasm
  target in this PR) and it uses debuginfo to figure out what `language`
  to put in the `producers` section.

* Threaded WebAssembly code now requires different flags to be passed
  with LLD. In LLD we now pass:

  * `--shared-memory` - required since objects are compiled with
    atomics. This also means that the generated memory will be marked as
    `shared`.
  * `--max-memory=1GB` - required with the `--shared-memory` argument
    since shared memories in WebAssembly must have a maximum size. The
    1GB number is intended to be a conservative estimate for rustc, but
    it should be overridable with `-C link-arg` if necessary.
  * `--passive-segments` - this has become the default for multithreaded
    memory, but when compiling a threaded module all data segments need
    to be marked as passive to ensure they don't re-initialize memory
    for each thread. This will also cause LLD to emit a synthetic
    function to initialize memory which users will have to arrange to
    call.
  * The `__heap_base` and `__data_end` globals are explicitly exported
    since they're now hidden by default due to the `--export` flags we
    pass to LLD.
src/librustc_codegen_ssa/back/linker.rs