| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
When the compiled executable would conflict with a directory, display a
rustc error instead of a verbose and potentially-confusing linker
error. This is a usability improvement, and doesn’t actually change
behaviour with regards to compilation success. This addresses the
concern in #35887.
|
|
|
|
|
|
|
|
errors
|
|
This commit primarily adds the ability to control what kind of LTO happens when
rustc performs LTO, namely allowing values to be specified to the `-C lto`
option, such as `-C lto=thin` and `-C lto=fat`. (where "fat" is the previous
kind of LTO, throw everything in one giant module)
Along the way this also refactors a number of fields which store information
about whether LTO/ThinLTO are enabled to unify them all into one field through
which everything is dispatched, hopefully removing a number of special cases
throughout.
This is intended to help mitigate #47409 but will require a backport as well,
and this would unfortunately need to be an otherwise insta-stable option.
|
|
|
|
Create the concept of an `StructuredDiagnostic` that is self-contained
with enough knowledge of all variables to create a `DiagnosticBuilder`,
including different possible versions (one line output and expanded
explanations).
|
|
Remove the IGNORED_ATTR_NAMES thread local
|
|
Change the --unpretty flag to -Z unpretty
First PR :smile: !
-Z unpretty no longer requires -Z unstable-options.
Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI).
Fix #47395
r? @nikomatsakis EDIT: apparently rust-highfive doesn't see edits...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't include DefIndex in proc-macro registrar function symbol.
There can only ever be one registrar function per plugin or proc-macro crate, so adding the `DefIndex` to the function's symbol name does not serve a real purpose. Remove the `DefIndex` from the symbol name makes it stable across incremental compilation sessions.
This should fix issue #47292.
|
|
-Z unpretty no longer requires -Z unstable-options. Also, I mildly
changed the syntax of the flag to match the other -Z flags. All uses of
the flag take the form `unpretty=something` where something can either
`string` or `string=string` (see the help messages of the CLI).
|
|
Add a default directory for -Zmir-dump-dir
The current behaviour of dumping in the current directory is rarely
desirable: a sensible default directory for dumping is much more
convenient. This makes sets the default value for `-Zmir-dump-dir`
to `mir_dump/`.
r? @eddyb
|
|
|
|
This avoids a breaking change to dep-info output, putting the
gcc/clang-compliant dep-info behavior behind a flag
|
|
|
|
|
|
The current behaviour of dumping in the current directory is rarely
desirable: a sensible default directory for dumping is much more
convenient.
|
|
Use DefIndex encoding that works better with on-disk variable length integer representations.
Use the least instead of the most significant bit for representing the address space.
r? @eddyb
|
|
Shorten names of some compiler generated artifacts.
This PR makes the compiler mangle codegen unit names by default. The name of every codegen unit name will now be a random string of 16 characters. It also makes the file extensions of some intermediate compiler products shorter. Hopefully, these changes will reduce the pressure on tools with path length restrictions like buildbot. The change should also solve problems with case-insensitive file system.
cc #47186 and #47222
r? @alexcrichton
|
|
length integer encodings.
|
|
|
|
The same effect can be achieved using -Cllvm-args=-debug
Refs #46437 as it removes LLVMRustSetDebug()
|
|
Use name-discarding LLVM context
This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not
requested.
In case either of these outputs are wanted, but the benefits of such context are
desired as well, -Zfewer_names option provides the same functionality regardless
of the outputs requested.
Should be a viable fix for https://github.com/rust-lang/rust/issues/46449
|
|
This showed up on the Windows bot for testing this PR, and this pr allows
`mark_incr_comp_session_as_invalid` ok if it's already invalid, hopefully
avoiding scary ICEs and instead leaving the nicely printed errors
|
|
This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not
requested.
In case either of these outputs are wanted, but the benefits of such context are
desired as well, -Zfewer_names option provides the same functionality regardless
of the outputs requested.
|
|
|
|
rustc: Set release mode cgus to 16 by default
This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.
Closes #45320
|
|
This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.
Closes #45320
|
|
Work towards thread safety in rustc
This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
|
|
Prevent rustc overwriting input files
If rustc is invoked on a file that would be overwritten by the
compilation, the compilation now fails, to avoid accidental loss. This
resolves #13019. Kudos to @estebank, whose patch I finished off.
|
|
|
|
In particular, -Znll might as well imply -Zborrowck=mir by default,
just like `#![feature(nll)]` does.
Also, if NLL is in use, no reason to emit end regions. The NLL pass
just strips them out anyway.
|
|
|
|
|
|
|
|
|
|
The result is not especially illuminating, but that's ok.
|
|
incr.comp.: Add `-C incremental` in addition to `-Z incremental`
This PR adds a stable commandline option for invoking incremental compilation.
r? @alexcrichton
|
|
If rustc is invoked on a file that would be overwritten by the
compilation, the compilation now fails, to avoid accidental loss. This
resolves #13019.
|
|
|
|
Fix division-by-zero ICE in -Z perf-stats
An invalid average now simply prints “N/A”. Fixes #46725.
|