| Age | Commit message (Collapse) | Author | Lines |
|
|
|
It is also intended for use with unions.
|
|
Upgrade `log` to `0.4` in multiple crates.
|
|
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
|
|
rustc: use {U,I}size instead of {U,I}s shorthands.
`Us`/`Is` come from a time when `us` and `is` were the literal suffixes that are now `usize` / `isize`.
r? @nikomatsakis
|
|
Bump to 1.25.0
* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
the beta branch but needed to go to the master branch as well.
|
|
Remove some outdated LLVM-related code
Ticks two boxes on #46437
|
|
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.
|
|
These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.
|
|
Generate code for unused const- and inline-fns if -Clink-dead-code is specified.
Fixes https://github.com/rust-lang/rust/issues/46467.
r? @alexcrichton
|
|
|
|
The function was added as a wrapper to handle compatibility with older
LLVM versions that we no longer support, so it can be removed.
Refs #46437
|
|
|
|
|
|
Update `rand` crate to `0.3.19`.
Update `log` crate to `0.3.9` and `0.4.1`.
Update `parking_lot_core` crate to `0.2.9`.
Upgrade all flate2 dependencies to `1.0.1`.
- Update `rust-installer` submodule.
|
|
It's unnecessary to print the linker options if there is no linker installed.
Currently, for libraries, the output is still printed, see #46998 for
discussion
|
|
Implements RFC 1937: `?` in `main`
This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.
Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help!
The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
|
|
|
|
|
|
|
|
This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.
|
|
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
|
|
Set the dwarf linkage_name to the mangled name
ref #46453
@michaelwoerister or anyone else who knows, i'm not sure if this is the correct instance to pass here (or how to get the correct one precisely): https://github.com//m4b/rust/blob/5a94a48678ec0a20ea6a63a783e63546bf9459b1/src/librustc_trans/debuginfo/namespace.rs#L36
So don't merge this yet, I'd like to learn about correct instance first; however, I think this already fixes a bunch of weirdness i'm seeing debugging from time to time, not to mention backtraces in gdb via `bt` are now ~readable~ meaningful :tada:
E.g.:
new:
```
(gdb) bt
#0 <inline::Foo as core::convert::From<()>>::from () at /home/m4b/tmp/bad_debug/inline.rs:11
#1 0x000055555555a35d in inline::deadbeef () at /home/m4b/tmp/bad_debug/inline.rs:16
#2 0x000055555555a380 in inline::main () at /home/m4b/tmp/bad_debug/inline.rs:20
```
old:
```
(gdb) bt
#0 inline::{{impl}}::from () at /home/m4b/tmp/bad_debug/inline.rs:11
#1 0x000055555555b0ed in inline::deadbeef () at /home/m4b/tmp/bad_debug/inline.rs:16
#2 0x000055555555b120 in inline::main () at /home/m4b/tmp/bad_debug/inline.rs:20
```
|
|
Prevent unwinding past FFI boundaries
Second attempt to write a patch to solve this.
r? @nikomatsakis
~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED
Other issues:
* llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library...
* ~~Mir inlining is a stub currently.~~ FIXED (no-op)
Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
|
|
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
|
|
incr.comp.: Use an array instead of a hashmap for storing result hashes.
Doing so should result in some of the core tracking components being faster.
r? @nikomatsakis
|
|
rustc: Work around `DICompileUnit` bugs in LLVM
This commit implements a workaround for #46346 which basically just
avoids triggering the situation that LLVM's bug
https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be
found in the code itself but this commit is also intended to ...
Closes #46346
|
|
|
|
The Abort Terminatorkind will cause an llvm.trap function call to be
emitted.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
|
|
Fix -Z lower_128bit_ops handling of statics
Avoids ICEs such as the following:
> error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
> get_optimized_mir: missing MIR for `DefId(8/0:40 ~
> compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`
r? @nagisa
cc #45676 @est31
|
|
Rollup of 14 pull requests
- Successful merges: #46359, #46517, #46671, #46751, #46760, #46787, #46794, #46828, #46831, #46835, #46851, #46852, #46856, #46870
- Failed merges:
|
|
Split PlaceContext::Store into Store & AsmOutput
Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as that's unsound for a Store-AsmOutput.
This PR is intended to make no changes, just be the mechanical split of the enum. Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows (see this FIXME: https://github.com/rust-lang/rust/pull/46852/files#diff-74dcd7740ab2104cd2b9a3b68dd4f208R543)
|
|
incr.comp.: Add `-C incremental` in addition to `-Z incremental`
This PR adds a stable commandline option for invoking incremental compilation.
r? @alexcrichton
|
|
Don't set the linkage_name for static variables
For `no_mangle` statics:
1. Linkage_name no longer set
2. The static variable also no longer has a dwarf namespace scope
This matches C++ output, which does not set the linkage_name and is not scoped:
e.g. c++:
```
0x000000b6: DW_TAG_base_type [8]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000077] = "long int")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
DW_AT_byte_size [DW_FORM_data1] (0x08)
0x000000bd: DW_TAG_variable [9]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000053] = "TEST")
DW_AT_type [DW_FORM_ref4] (cu + 0x0048 => {0x00000048})
DW_AT_external [DW_FORM_flag_present] (true)
DW_AT_decl_file [DW_FORM_data1] ("/home/m4b/tmp/bad_debug/test.cpp")
DW_AT_decl_line [DW_FORM_data1] (14)
DW_AT_location [DW_FORM_exprloc] (<0x9> 03 40 10 20 00 00 00 00 00 )
0x000000d2: DW_TAG_namespace [2] *
DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009d] = "std")
```
and (now) Rust:
```
0x0000002a: DW_TAG_variable [2]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000046] = "TEST")
DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x00000045})
DW_AT_external [DW_FORM_flag_present] (true)
DW_AT_decl_file [DW_FORM_data1] ("/tmp/test.rs")
DW_AT_decl_line [DW_FORM_data1] (8)
DW_AT_alignment [DW_FORM_udata] (1)
DW_AT_location [DW_FORM_exprloc] (<0x9> 03 c0 4d 06 00 00 00 00 00 )
0x00000040: DW_TAG_namespace [3] *
DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000004b] = "test")
```
|
|
|
|
scope. ref #33172
|
|
Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as it cannot be done for a Store-AsmOutput.
This PR is intended to make no changes, just be the mechanical split of the enum. Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows.
|
|
Avoids ICEs such as the following:
error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
get_optimized_mir: missing MIR for `DefId(8/0:40 ~
compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`
|
|
Rollup of 11 pull requests
- Successful merges: #46700, #46786, #46790, #46800, #46801, #46802, #46804, #46805, #46812, #46824, #46825
- Failed merges:
|
|
This commit implements a workaround for #46346 which basically just
avoids triggering the situation that LLVM's bug
https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be
found in the code itself but this commit is also intended to ...
Closes #46346
|
|
Also remove `def_ty`, which was a footgun because it did not do the
above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|