1. 05 3月, 2018 6 次提交
  2. 04 3月, 2018 11 次提交
    • B
      Auto merge of #47832 - fintelia:vec-index, r=kennytm · 1e1bfc71
      bors 提交于
      Have Vec use slice's implementations of Index<I> and IndexMut<I>
      
      This PR simplifies the implementation of Index and IndexMut on Vec, and in the process enables indexing Vec by any user types that implement SliceIndex.
      
      The stability annotations probably need to be changed, but I wasn't sure of the right way to do that. It also wasn't completely clear to me if this change could break any existing code.
      1e1bfc71
    • B
      Auto merge of #48587 - Zoxc:transitive-relation, r=nikomatsakis · 9ff5cb5a
      bors 提交于
      Make TransitiveRelation thread safe. Avoid locking by using get_mut in some cases
      
      r? @nikomatsakis
      9ff5cb5a
    • B
      Auto merge of #48630 - alexcrichton:more-sccache, r=kennytm · 4a316e74
      bors 提交于
      rustbuild: Pass `ccache` to build scripts
      
      This is a re-attempt at #48192 hopefully this time with 100% less randomly
      [blocking builds for 20 minutes][block]. To work around #48192 the sccache
      server is started in the `run.sh` script very early on in the compilation
      process.
      
      [block]: https://github.com/rust-lang/rust/issues/48192
      4a316e74
    • B
      Auto merge of #48125 - alexcrichton:lld, r=Mark-Simulacrum · 4a720632
      bors 提交于
      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
      4a720632
    • A
      rustc: Tweak default linker selection · 0129b01a
      Alex Crichton 提交于
      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.
      0129b01a
    • A
      rust: Import LLD for linking wasm objects · d69b2480
      Alex Crichton 提交于
      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
      d69b2480
    • B
      Auto merge of #48600 - Mark-Simulacrum:rustbuild-updates-2, r=alexcrichton · 0be38e1c
      bors 提交于
      Remove --host and --target arguments to configure in Dockerfiles
      
      These arguments are passed to the relevant x.py invocation in all cases
      anyway. As such, there is no need to separately configure them. x.py
      will ignore the configuration when they are passed on the command line
      anyway.
      
      r? @alexcrichton
      0be38e1c
    • B
      Auto merge of #48694 - kennytm:rollup, r=kennytm · e026b59c
      bors 提交于
      Rollup of 8 pull requests
      
      - Successful merges: #48283, #48466, #48569, #48629, #48637, #48680, #48513, #48664
      - Failed merges:
      e026b59c
    • K
      Rollup merge of #48664 - Keruspe:codegen, r=alexcrichton · ea354b6a
      kennytm 提交于
      make codegen-backends directory name configurable
      
      This allows to parallel-install several versions of rust system-wide
      Fixes #48263
      ea354b6a
    • K
      Rollup merge of #48513 - alexcrichton:simd, r=JoshTriplett · 6f07aaa4
      kennytm 提交于
      std: Add `arch` and `simd` modules
      
      This commit imports the `stdsimd` crate into the standard library,
      creating an `arch` and `simd` module inside of both libcore and libstd.
      Both of these modules are **unstable** and will continue to be so until
      RFC 2335 is stabilized.
      
      As a brief recap, the modules are organized as so:
      
      * `arch` contains all current architectures with intrinsics, for example
        `std::arch::x86`, `std::arch::x86_64`, `std::arch::arm`, etc. These
        modules contain all of the intrinsics defined for the platform, like
        `_mm_set1_epi8`.
      * In the standard library, the `arch` module also exports a
        `is_target_feature_detected` macro which performs runtime detection to
        determine whether a target feature is available at runtime.
      * The `simd` module contains experimental versions of strongly-typed
        lane-aware SIMD primitives, to be fully fleshed out in a future RFC.
      
      The main purpose of this commit is to start pulling in all these
      intrinsics and such into the standard library on nightly and allow
      testing and such. This'll help allow users to easily kick the tires and
      see if intrinsics work as well as allow us to test out all the
      infrastructure for moving the intrinsics into the standard library.
      6f07aaa4
    • K
      Rollup merge of #48680 - steveklabnik:no-toc, r=nikomatsakis · e71c96fa
      kennytm 提交于
      Don't produce TOCs for doc markdown files
      
      Currently, we are producing headers for markdown files,
      which is generally not what we want. As such, passing this
      flag causes them to render normally.
      
      https://doc.rust-lang.org/nightly/book/ is an example page currently where this is done incorrectly.
      e71c96fa
  3. 03 3月, 2018 23 次提交