| Age | Commit message (Collapse) | Author | Lines |
|
panic when calling MaybeUninhabited::into_inner on uninhabited type
I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
|
|
Add support for trait-objects without a principal
The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate.
Fixes #33140.
Fixes #57057.
r? @nikomatsakis
|
|
should be a pure refactoring.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix recursion limits
r? @michaelwoerister
|
|
|
|
We need to reduce the alignment with the used offset. If the offset
isn't known, we need to reduce with the element size to support
arbitrary offsets.
|
|
|
|
Bump minimum required LLVM version to 6.0
Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that.
I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch.
r? @alexcrichton
|
|
r=alexcrichton
Update libc version required by rustc
This is meant to be an easy-to-backport fix for #55465
|
|
Stabilize `linker-flavor` flag.
Part of #55396.
This commit moves the linker-flavor flag from a debugging option to a
codegen option, thus stabilizing it. There are no feature flags
associated with this flag.
r? @nagisa
|
|
This commit moves the linker-flavor flag from a debugging option to a
codegen option, thus stabilizing it. There are no feature flags
associated with this flag.
|
|
rust-lang/libc#1057.
Part of issue #55465
|
|
Instead of maybe storing its own sysroot and maybe deferring to the one
in `Session::opts`, just clone the latter when necessary so one is
always directly available. This removes the need for the getter.
|
|
This is no longer necessary for LLVM >= 6.
|
|
|
|
Use a function to access the Hir map to be able to turn it into a query later
r? @eddyb
|
|
Discard LLVM modules earlier when performing ThinLTO
Currently ThinLTO is performed by first compiling all modules (and keeping them in memory), and then serializing them into ThinLTO buffers in a separate, synchronized step. Modules are later read back from ThinLTO buffers when running the ThinLTO optimization pipeline.
We can also find the following comment in `lto.rs`:
// FIXME: right now, like with fat LTO, we serialize all in-memory
// modules before working with them and ThinLTO. We really
// shouldn't do this, however, and instead figure out how to
// extract a summary from an in-memory module and then merge that
// into the global index. It turns out that this loop is by far
// the most expensive portion of this small bit of global
// analysis!
I don't think that what is suggested here is the right approach: One of the primary benefits of using ThinLTO over ordinary LTO is that it's not necessary to keep all the modules (merged or not) in memory for the duration of the linking step.
However, we currently don't really make use of this (at least for crate-local ThinLTO), because we keep all modules in memory until the start of the LTO step. This PR changes the implementation to instead perform the serialization into ThinLTO buffers directly after the initial optimization step.
Most of the changes here are plumbing to separate out fat and thin lto handling in `write.rs`, as these now use different intermediate artifacts. For fat lto this will be in-memory modules, for thin lto it will be ThinLTO buffers.
r? @alexcrichton
|
|
|
|
cleanup: remove static lifetimes from consts
A follow-up to https://github.com/rust-lang/rust/pull/56497.
|
|
Instead of keeping all modules in memory until thin LTO and only
serializing them then, serialize the module immediately after
it finishes optimizing.
|
|
Fat LTO merges into one module, so only return one module.
|
|
|
|
These are going to have different intermediate artifacts, so
create separate codepaths for them.
|
|
Instead of only determining whether some form of LTO is necessary,
determine whether thin, fat or no LTO is necessary. I've rewritten
the conditions in a way that I think is more obvious, i.e. specified
LTO type + additional preconditions.
|
|
|
|
|
|
|
|
Refactor rustc_codegen_ssa
cc #56108 (not all things are done yet)
This removes an unsafe method from cg_ssa.
r? @eddyb
cc @sunfishcode
|
|
rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker
Part of #55396.
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
r? @nagisa
cc @alexcrichton @japaric
|
|
(compiler front-ends).
|
|
This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuilderMethods::checked_binop
|
|
|
|
|
|
|
|
|
|
|
|
|