Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Technolution/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: rust-riscv-master
Choose a head ref
  • 14 commits
  • 76 files changed
  • 3 contributors

Commits on Feb 26, 2018

  1. 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
    alexcrichton committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    f94ed22 View commit details
    Browse the repository at this point in the history
  2. rustc: Tweak default linker selection

    This commit refactors how the path to the linker that we're going to invoke is
    selected. Previously all targets listed *both* a `LinkerFlavor` and a `linker`
    (path) option, but this meant that whenever you changed one you had to change
    the other. The purpose of this commit is to avoid coupling these where possible.
    
    Target specifications now only unconditionally define the *flavor* of the linker
    that they're using by default. If not otherwise specified each flavor now
    implies a particular default linker to run. As a result, this means that if
    you'd like to test out `ld` for example you should be able to do:
    
        rustc -Z linker-flavor=ld foo.rs
    
    whereas previously you had to do
    
        rustc -Z linker-flavor=ld -C linker=ld foo.rs
    
    This will hopefully make it a bit easier to tinker around with variants that
    should otherwise be well known to work, for example with LLD, `ld` on OSX, etc.
    alexcrichton committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    02f97c3 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2018

  1. Configuration menu
    Copy the full SHA
    ab0807e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fbc6ee View commit details
    Browse the repository at this point in the history
  3. [NO-UPSTREAM] Change lld url.

    dvc94ch committed Feb 27, 2018
    Configuration menu
    Copy the full SHA
    a9c1ab3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d68a74 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8016956 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    234b8b1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d9b7c31 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    506fa83 View commit details
    Browse the repository at this point in the history
  9. Add RISCV 32-bit support.

    dvc94ch committed Feb 27, 2018
    Configuration menu
    Copy the full SHA
    1a8053d View commit details
    Browse the repository at this point in the history
  10. Port libstd to RISCV.

    dvc94ch committed Feb 27, 2018
    Configuration menu
    Copy the full SHA
    842ce79 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2018

  1. Add built-in target riscv32im-unknown-none

    Steyn Huurman committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    376a7c3 View commit details
    Browse the repository at this point in the history
  2. Add clarification for RISC-V support in README.md

    Steyn Huurman committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    0a4a866 View commit details
    Browse the repository at this point in the history
Loading