1. 18 Mar, 2019 1 commit
  2. 19 Feb, 2019 1 commit
  3. 04 Feb, 2019 1 commit
  4. 25 Jan, 2019 1 commit
    • Josh Stone's avatar
      Rebase to the llvm-project monorepo · df0466d0
      Josh Stone authored
      The new git submodule src/llvm-project is a monorepo replacing src/llvm
      and src/tools/{clang,lld,lldb}.  This also serves as a rebase for these
      projects to the new 8.x branch from trunk.
      
      The src/llvm-emscripten fork is unchanged for now.
      df0466d0
  5. 24 Dec, 2018 1 commit
    • Alex Crichton's avatar
      std: Use backtrace-sys from crates.io · 8d500572
      Alex Crichton authored
      This commit switches the standard library to using the `backtrace-sys`
      crate from crates.io instead of duplicating the logic here in the Rust
      repositor with the `backtrace-sys`'s crate's logic.
      
      Eventually this will hopefully be a good step towards using the
      `backtrace` crate directly from crates.io itself, but we're not quite
      there yet! Hopefully this is a small incremental first step we can take.
      8d500572
  6. 12 Dec, 2018 1 commit
    • Alex Crichton's avatar
      std: Depend directly on crates.io crates · 4c21a3bc
      Alex Crichton authored
      Ever since we added a Cargo-based build system for the compiler the
      standard library has always been a little special, it's never been able
      to depend on crates.io crates for runtime dependencies. This has been a
      result of various limitations, namely that Cargo doesn't understand that
      crates from crates.io depend on libcore, so Cargo tries to build crates
      before libcore is finished.
      
      I had an idea this afternoon, however, which lifts the strategy
      from #52919 to directly depend on crates.io crates from the standard
      library. After all is said and done this removes a whopping three
      submodules that we need to manage!
      
      The basic idea here is that for any crate `std` depends on it adds an
      *optional* dependency on an empty crate on crates.io, in this case named
      `rustc-std-workspace-core`. This crate is overridden via `[patch]` in
      this repository to point to a local crate we write, and *that* has a
      `path` dependency on libcore.
      
      Note that all `no_std` crates also depend on `compiler_builtins`, but if
      we're not using submodules we can publish `compiler_builtins` to
      crates.io and all crates can depend on it anyway! The basic strategy
      then looks like:
      
      * The standard library (or some transitive dep) decides to depend on a
        crate `foo`.
      * The standard library adds
      
        ```toml
        [dependencies]
        foo = { version = "0.1", features = ['rustc-dep-of-std'] }
        ```
      * The crate `foo` has an optional dependency on `rustc-std-workspace-core`
      * The crate `foo` has an optional dependency on `compiler_builtins`
      * The crate `foo` has a feature `rustc-dep-of-std` which activates these
        crates and any other necessary infrastructure in the crate.
      
      A sample commit for `dlmalloc` [turns out to be quite simple][commit].
      After that all `no_std` crates should largely build "as is" and still be
      publishable on crates.io! Notably they should be able to continue to use
      stable Rust if necessary, since the `rename-dependency` feature of Cargo
      is soon stabilizing.
      
      As a proof of concept, this commit removes the `dlmalloc`,
      `libcompiler_builtins`, and `libc` submodules from this repository. Long
      thorns in our side these are now gone for good and we can directly
      depend on crates.io! It's hoped that in the long term we can bring in
      other crates as necessary, but for now this is largely intended to
      simply make it easier to manage these crates and remove submodules.
      
      This should be a transparent non-breaking change for all users, but one
      possible stickler is that this almost for sure breaks out-of-tree
      `std`-building tools like `xargo` and `cargo-xbuild`. I think it should
      be relatively easy to get them working, however, as all that's needed is
      an entry in the `[patch]` section used to build the standard library.
      Hopefully we can work with these tools to solve this problem!
      
      [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
      4c21a3bc
  7. 07 Dec, 2018 1 commit
  8. 30 Nov, 2018 1 commit
  9. 27 Nov, 2018 1 commit
    • Tom Tromey's avatar
      Re-enable lldb · 999595f6
      Tom Tromey authored
      Commit 7215963e disabled lldb due to the LLVM update.  This patch
      updates lldb to build against the Rust LLVM, and re-enables it.
      999595f6
  10. 26 Nov, 2018 1 commit
  11. 09 Nov, 2018 1 commit
  12. 04 Nov, 2018 1 commit
  13. 02 Nov, 2018 1 commit
    • Alex Crichton's avatar
      Remove all jemalloc-related content · 61e89446
      Alex Crichton authored
      This commit removes all jemalloc related submodules, configuration, etc,
      from the bootstrap, from the standard library, and from the compiler.
      This will be followed up with a change to use jemalloc specifically as
      part of rustc on blessed platforms.
      61e89446
  14. 18 Oct, 2018 2 commits
  15. 05 Sep, 2018 1 commit
  16. 04 Sep, 2018 1 commit
    • Tom Tromey's avatar
      Restore lldb build · 289da843
      Tom Tromey authored
      commit 6c101422 ("Update LLVM submodule") disabled the lldb build.
      This patch updates the lldb and clang submodules to once again build
      against the LLVM that is included in the Rust tree, and reverts the
      .travis.yml changes from that patch.
      289da843
  17. 15 Aug, 2018 1 commit
    • Tom Tromey's avatar
      Add lldb to the build · 6e3a4f4d
      Tom Tromey authored
      This optionally adds lldb (and clang, which it needs) to the build.
      
      Because rust uses LLVM 7, and because clang 7 is not yet released, a
      recent git master version of clang is used.
      
      The lldb that is used includes the Rust plugin.
      
      lldb is only built when asked for, or when doing a nightly build on
      macOS.  Only macOS is done for now due to difficulties with the Python
      dependency.
      6e3a4f4d
  18. 30 May, 2018 1 commit
    • Alex Crichton's avatar
      Replace libbacktrace with a submodule · 7c14a54b
      Alex Crichton authored
      While we're at it update the `backtrace` crate from crates.io. It turns out that
      the submodule's configure script has gotten a lot more finnicky as of late so
      also switch over to using the `cc` crate manually which allows to avoid some
      hacks around the configure script as well
      7c14a54b
  19. 16 Apr, 2018 2 commits
    • Alex Crichton's avatar
      Separately gate each target_feature feature · 1217d704
      Alex Crichton authored
      Use an explicit whitelist for what features are actually stable and can be
      enabled.
      1217d704
    • Alex Crichton's avatar
      Stabilize x86/x86_64 SIMD · 598d836f
      Alex Crichton authored
      This commit stabilizes the SIMD in Rust for the x86/x86_64 platforms. Notably
      this commit is stabilizing:
      
      * The `std::arch::{x86, x86_64}` modules and the intrinsics contained inside.
      * The `is_x86_feature_detected!` macro in the standard library
      * The `#[target_feature(enable = "...")]` attribute
      * The `#[cfg(target_feature = "...")]` matcher
      
      Stabilization of the module and intrinsics were primarily done in
      rust-lang-nursery/stdsimd#414 and the two attribute stabilizations are done in
      this commit. The standard library is also tweaked a bit with the new way that
      stdsimd is integrated.
      
      Note that other architectures like `std::arch::arm` are not stabilized as part
      of this commit, they will likely stabilize in the future after they've been
      implemented and fleshed out. Similarly the `std::simd` module is also not being
      stabilized in this commit, only `std::arch`. Finally, nothing related to `__m64`
      is stabilized in this commit either (MMX), only SSE and up types and intrinsics
      are stabilized.
      
      Closes #29717
      Closes #44839
      Closes #48556
      598d836f
  20. 04 Mar, 2018 1 commit
    • Alex Crichton's avatar
      rust: Import LLD for linking wasm objects · d69b2480
      Alex Crichton authored
      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
  21. 02 Mar, 2018 1 commit
    • Alex Crichton's avatar
      std: Add `arch` and `simd` modules · c72537f2
      Alex Crichton authored
      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.
      c72537f2
  22. 16 Feb, 2018 1 commit
    • Guillaume Gomez's avatar
      Remove hoedown from rustdoc · 5bd5bc3f
      Guillaume Gomez authored
      Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long?
      
      -----
      
      So, timeline for those who need to catch up:
      
      * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io.
      * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed.
      * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates.
      * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously.
      * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences.
      * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people.
        * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land.
        * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers.
        * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04.
        * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown.
      
      And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
      5bd5bc3f
  23. 29 Jan, 2018 1 commit
    • Alex Crichton's avatar
      rustc: Split Emscripten to a separate codegen backend · c6daea7c
      Alex Crichton authored
      This commit introduces a separately compiled backend for Emscripten, avoiding
      compiling the `JSBackend` target in the main LLVM codegen backend. This builds
      on the foundation provided by #47671 to create a new codegen backend dedicated
      solely to Emscripten, removing the `JSBackend` of the main codegen backend in
      the process.
      
      A new field was added to each target for this commit which specifies the backend
      to use for translation, the default being `llvm` which is the main backend that
      we use. The Emscripten targets specify an `emscripten` backend instead of the
      main `llvm` one.
      
      There's a whole bunch of consequences of this change, but I'll try to enumerate
      them here:
      
      * A *second* LLVM submodule was added in this commit. The main LLVM submodule
        will soon start to drift from the Emscripten submodule, but currently they're
        both at the same revision.
      * Logic was added to rustbuild to *not* build the Emscripten backend by default.
        This is gated behind a `--enable-emscripten` flag to the configure script. By
        default users should neither check out the emscripten submodule nor compile
        it.
      * The `init_repo.sh` script was updated to fetch the Emscripten submodule from
        GitHub the same way we do the main LLVM submodule (a tarball fetch).
      * The Emscripten backend, turned off by default, is still turned on for a number
        of targets on CI. We'll only be shipping an Emscripten backend with Tier 1
        platforms, though. All cross-compiled platforms will not be receiving an
        Emscripten backend yet.
      
      This commit means that when you download the `rustc` package in Rustup for Tier
      1 platforms you'll be receiving two trans backends, one for Emscripten and one
      that's the general LLVM backend. If you never compile for Emscripten you'll
      never use the Emscripten backend, so we may update this one day to only download
      the Emscripten backend when you add the Emscripten target. For now though it's
      just an extra 10MB gzip'd.
      
      Closes #46819
      c6daea7c
  24. 13 Jan, 2018 1 commit
  25. 28 Dec, 2017 1 commit
  26. 06 Dec, 2017 1 commit
  27. 20 Nov, 2017 1 commit
    • Alex Crichton's avatar
      std: Add a new wasm32-unknown-unknown target · 80ff0f74
      Alex Crichton authored
      This commit adds a new target to the compiler: wasm32-unknown-unknown. This
      target is a reimagining of what it looks like to generate WebAssembly code from
      Rust. Instead of using Emscripten which can bring with it a weighty runtime this
      instead is a target which uses only the LLVM backend for WebAssembly and a
      "custom linker" for now which will hopefully one day be direct calls to lld.
      
      Notable features of this target include:
      
      * There is zero runtime footprint. The target assumes nothing exists other than
        the wasm32 instruction set.
      * There is zero toolchain footprint beyond adding the target. No custom linker
        is needed, rustc contains everything.
      * Very small wasm modules can be generated directly from Rust code using this
        target.
      * Most of the standard library is stubbed out to return an error, but anything
        related to allocation works (aka `HashMap`, `Vec`, etc).
      * Naturally, any `#[no_std]` crate should be 100% compatible with this new
        target.
      
      This target is currently somewhat janky due to how linking works. The "linking"
      is currently unconditional whole program LTO (aka LLVM is being used as a
      linker). Naturally that means compiling programs is pretty slow! Eventually
      though this target should have a linker.
      
      This target is also intended to be quite experimental. I'm hoping that this can
      act as a catalyst for further experimentation in Rust with WebAssembly. Breaking
      changes are very likely to land to this target, so it's not recommended to rely
      on it in any critical capacity yet. We'll let you know when it's "production
      ready".
      
      ---
      
      Currently testing-wise this target is looking pretty good but isn't complete.
      I've got almost the entire `run-pass` test suite working with this target (lots
      of tests ignored, but many passing as well). The `core` test suite is still
      getting LLVM bugs fixed to get that working and will take some time. Relatively
      simple programs all seem to work though!
      
      ---
      
      It's worth nothing that you may not immediately see the "smallest possible wasm
      module" for the input you feed to rustc. For various reasons it's very difficult
      to get rid of the final "bloat" in vanilla rustc (again, a real linker should
      fix all this). For now what you'll have to do is:
      
          cargo install --git https://github.com/alexcrichton/wasm-gc
          wasm-gc foo.wasm bar.wasm
      
      And then `bar.wasm` should be the smallest we can get it!
      
      ---
      
      In any case for now I'd love feedback on this, particularly on the various
      integration points if you've got better ideas of how to approach them!
      80ff0f74
  28. 17 Sep, 2017 1 commit
  29. 13 Sep, 2017 2 commits
  30. 15 Aug, 2017 1 commit
  31. 05 Jul, 2017 1 commit
    • Alex Crichton's avatar
      Switch to rust-lang-nursery/compiler-builtins · 7e6c9f36
      Alex Crichton authored
      This commit migrates the in-tree `libcompiler_builtins` to the upstream version
      at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version
      has a number of intrinsics written in Rust and serves as an in-progress rewrite
      of compiler-rt into Rust. Additionally it also contains all the existing
      intrinsics defined in `libcompiler_builtins` for 128-bit integers.
      
      It's been the intention since the beginning to make this transition but
      previously it just lacked the manpower to get done. As this PR likely shows it
      wasn't a trivial integration! Some highlight changes are:
      
      * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes
        across platforms and also some refactorings to make the intrinsics easier to
        read. The additional testing added there also fixed a number of integration
        issues when pulling the repository into this tree.
      
      * LTO with the compiler-builtins crate was fixed to link in the entire crate
        after the LTO process as these intrinsics are excluded from LTO.
      
      * Treatment of hidden symbols was updated as previously the
        `#![compiler_builtins]` crate would mark all symbol *imports* as hidden
        whereas it was only intended to mark *exports* as hidden.
      7e6c9f36
  32. 17 May, 2017 1 commit
    • Tatsuyuki Ishi's avatar
      Unify all stage2 tools into a workspace · 0e79b979
      Tatsuyuki Ishi authored
      This avoids double compiled Cargo. Hopefully this would speed up (extended) compilation for ~10m.
      
      Notes: when updating Cargo submodule, the replacement version may also need to be updated.
      0e79b979
  33. 15 May, 2017 1 commit
  34. 29 Apr, 2017 1 commit
    • Alex Crichton's avatar
      Update stage0 bootstrap compiler · 5daf557a
      Alex Crichton authored
      We've got a freshly minted beta compiler, let's update to use that on nightly!
      This has a few other changes associated with it as well
      
      * A bump to the rustc version number (to 1.19.0)
      * Movement of the `cargo` and `rls` submodules to their "proper" location in
        `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
        option this can work.
      * Updates of the `cargo` and `rls` submodules to their master branches.
      * Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
        numbers. On the beta channel Cargo will bootstrap from a different version
        than rustc (e.g. the version numbers are different), so we need different
        configuration for this.
      * Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
        then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
        of `static.rust-lang.org`. This is added to accomodate our updated release
        process with Travis and AppVeyor.
      5daf557a
  35. 17 Apr, 2017 1 commit
  36. 09 Apr, 2017 1 commit
  37. 06 Apr, 2017 1 commit