| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Implement some trivial size_hints for various iterators
This also implements ExactSizeIterator where applicable.
Addresses most of the Iterator traits mentioned in #23708.
I intend to do more, but I don't want to make the PR too large.
|
|
Introduce a TargetTriple enum to support absolute target paths
This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used.
The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension).
For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
|
|
|
|
|
|
Add basic PGO support.
This PR adds two mutually exclusive options for profile usage and generation using LLVM's instruction profile generation (the same as clang uses), `-C pgo-use` and `-C pgo-gen`.
See each commit for details.
|
|
Pass --strip-debug to GccLinker when building without debuginfo
C.f. #46034
---
This brings a hello-world built by passing rustc no command line options from 2.9M to 592K on Linux.
(This might need to special case MacOS or Windows, not sure if the linkers there support `--strip-debug`, and there is an annoying lack of dependable docs for the linkers there.)
|
|
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|
and generation.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|
Add a -Z flag for LLVM align attributes on arguments
LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.
For example, this makes `mem::swap::<u64x8>` be 8x `vmovaps ymm` instead of 16x `vmovups xmm`, on my cpu.
|
|
NLL should identify and respect the lifetime annotations that the user wrote
Part of #47184.
r? @nikomatsakis
|
|
|
|
|
|
This also implements ExactSizeIterator where applicable.
Addresses most of the Iterator traits mentioned in #23708.
|
|
LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.
For example, this makes `swap::<u64x8>` be 8x `vmovaps ymm` instead of 16x `vmovups xmm`, on my cpu.
|
|
|
|
rustc: Enable embedding LLVM bitcode for iOS
This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!
Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.
|
|
Clarify usage message for --remap-path-prefix.
|
|
|
|
|
|
This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!
Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.
|
|
|
|
It is backed by the new `normalize_projection_ty` query, which uses
canonicalization.
|
|
|
|
|
|
|
|
[NLL] Make causal tracking lazy
Close #46590
cc @nikomatsakis
|
|
|
|
configuring them
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #47311.
r? @nrc
|
|
|
|
|
|
|
|
Currently rustc isn't always the best at producing deterministic builds of a
crate when the source directory of a crate is changed. This is happening due to
what appears two different sources:
* First the `-L` paths passed to rustc are hashed into the crate hash. These
paths through Cargo are typically absolute paths that can vary if the build
directory changes.
* Next the paths passed to `--extern` are also hashed which like `-L` can change
if the build directory changes.
This commit fixes these two sources of nondeterminism by ensuring that avoiding
tracking the hashes of these arguments on the command line. For `-L` paths
they're either related to loading crates (whose hashes are tracked elsewhere) or
native librarise used in the linking phase (which isn't incremental). The
`--extern` paths are similar in that they're related to crate resolution which
is already tracked independently of the command line arguments.
Closes #48019
|
|
Fixes #47311.
r? @nrc
|
|
Fixes #47311.
r? @nrc
|
|
|
|
|
|
|
|
|
|
|
|
Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.
This is an implementation for issue of #41555.
|
|
Handle path prefix mapping in a more stable way when computing the crate hash
This hopefully fixes issue https://github.com/rust-lang/rust/issues/48019.
cc @luser @infinity0
|