Commit Graph

2185 Commits

Author SHA1 Message Date
bjorn3
b4bf4b5c09 Enable and disable some rust-analyzer diagnostics 2021-04-14 14:20:42 +02:00
bjorn3
542e73e8ac
Merge pull request #1158 from bjorn3/isolate_mono_items_pr
Isolate mono items
2021-04-14 11:43:58 +02:00
bjorn3
65420b50f8 Don't deduplicate anonymous allocations 2021-04-14 10:38:18 +02:00
bjorn3
f3b0f425c5 Don't deduplicate vtables between functions 2021-04-14 10:37:16 +02:00
bjorn3
b6f7e71c1d Update Cranelift 2021-04-14 10:37:14 +02:00
bjorn3
29a4a551eb Rustfmt 2021-04-12 12:09:05 +02:00
pierwill
a7c4c3ee71 Fix outdated crate names in compiler docs
Changes `librustc_X` to `rustc_X`, only in documentation comments.
Plain code comments are left unchanged.

Also fix incorrect file paths.
2021-04-08 11:12:14 -05:00
bjorn3
53bfc6729a Centralize all configuration into config.rs 2021-04-07 11:52:11 +02:00
bjorn3
1ee0aa9416 Move BackendConfig to config.rs 2021-04-07 11:02:54 +02:00
bjorn3
3d7d08f338 Simplify write_metadata 2021-04-07 10:54:43 +02:00
bjorn3
e1a2f0f351 Rustup to rustc 1.53.0-nightly (c051c5ddd 2021-04-06) 2021-04-07 10:16:01 +02:00
bjorn3
0c1725f8bb Fixup previous commit 2021-04-06 13:59:54 +02:00
bjorn3
7a1cf889c7 Fix rustc test suite by ignoring rustdoc test 2021-04-06 13:14:45 +02:00
bjorn3
8114d933bd Rustup to rustc 1.53.0-nightly (d32238532 2021-04-05) 2021-04-06 12:27:45 +02:00
bjorn3
2cb13ca20e Sync from rust 354cc751b7 2021-04-06 12:20:12 +02:00
bjorn3
ab425a4bca Revert "Build with -Cpanic=unwind by default"
This reverts commit afe74d71e4. It
shouldn't have been pushed to master as it isn't ready yet.
2021-03-31 13:47:10 +02:00
bjorn3
2ceb527728 Remove the cold block optimization
It isn't effective with the new backend framework
2021-03-31 12:42:30 +02:00
bjorn3
a793be8ee8 Remove the stack2reg optimization completely
It is broken and needs to be rewritten from scratch
2021-03-31 12:34:01 +02:00
bjorn3
afe74d71e4 Build with -Cpanic=unwind by default
This doesn't enable unwinding as cg_clif doesn't support it yet. It does
allow for linking to a cg_llvm compiled libstd.so, which uses
`-Cpanic=unwind`.
2021-03-31 12:16:33 +02:00
bjorn3
6e799438b7 Add an Mmap wrapper to rustc_data_structures
This wrapper implements StableAddress and falls back to directly reading
the file on wasm32
2021-03-30 18:57:03 +02:00
bjorn3
5417278438 Sync from rust 3aedcf06b7 2021-03-29 16:33:09 +02:00
bjorn3
07968a001d Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29 2021-03-29 10:45:09 +02:00
bjorn3
0969bc6dde Rustup to rustc 1.53.0-nightly (4a20eb6a9 2021-03-28) 2021-03-29 10:26:20 +02:00
bjorn3
94b51d14e6 Make all compiler-builtins symbols hidden
This matches cg_llvm

Fixes #1152
2021-03-27 17:32:41 +01:00
bjorn3
f3e8f6dc08 Rustfmt 2021-03-26 14:35:51 +01:00
bjorn3
7889a32c0f Rustup to rustc 1.53.0-nightly (52e3dffa5 2021-03-25) 2021-03-26 13:33:03 +01:00
bjorn3
9a21312480 Sync from rust 4137088d9d 2021-03-26 13:02:49 +01:00
bjorn3
73626efb26 Rustfmt 2021-03-21 10:05:48 +01:00
bjorn3
56fe51cb36 Update Cranelift 2021-03-21 10:05:22 +01:00
lcnr
500bcfcdb3 update const_eval_resolve 2021-03-20 17:22:24 +01:00
SparrowLii
e4a1092b9f Add simd_neg platform intrinsic 2021-03-19 02:16:21 +08:00
bjorn3
7bd3950831 Fix rustc test suite 2021-03-18 13:15:37 +01:00
bjorn3
0069007d5b Avoid nightly feature usage where easily possible 2021-03-18 12:23:55 +01:00
bjorn3
664b25ea38 Rustup to rustc 1.52.0-nightly (36f1f04f1 2021-03-17) 2021-03-18 12:19:31 +01:00
bjorn3
6a0ce7f6bb Sync from rust 04ae50179a 2021-03-17 18:36:30 +01:00
bjorn3
e86b95480f Directly invoke the main function in JIT mode
Fixes #1151
2021-03-17 13:56:54 +01:00
bjorn3
218b383f8f Rustfmt 2021-03-17 13:54:40 +01:00
bjorn3
53235d2abb Enable thread test in std_example
Turns out libstd doesn't use #[thread_local] on Windows at all
2021-03-15 18:01:48 +01:00
bjorn3
a47896d6e4
Merge pull request #1149 from bjorn3/test_rustc_testsuite
Run the rustc test suite on CI
2021-03-15 16:30:52 +01:00
bjorn3
80b2feae1a Run the rustc test suite on CI 2021-03-15 15:22:18 +01:00
bjorn3
154668bd02 Suppress an unnecessary warning and fix an incorrect warning 2021-03-15 14:48:58 +01:00
bjorn3
afc529dbe7 Fix assert_assignable adt checking 2021-03-15 14:22:11 +01:00
bjorn3
f545a21fbe Split rust fork setup out of test_bootstrap.sh 2021-03-15 14:21:15 +01:00
bjorn3
78d0b77651 Update Cranelift 2021-03-15 14:04:22 +01:00
bjorn3
3d85f05dfd Remove no longer necessary intcasts 2021-03-15 14:04:04 +01:00
Oli Scherer
21a0c8e9e4 s/ConstantSource/ConstantKind/ 2021-03-15 12:06:52 +00:00
bjorn3
b1d14ca05d Use mmap for metadata loading
This can have a significant improvement on compilation times. In
addition it reduces the memory consumption.

Fixes #927
2021-03-15 11:59:06 +01:00
bjorn3
578fcdef5f Special case ZST's in Rvalue::Repeat
Fixes #1146 by preventing a hang for [(); usize::MAX], which is used in
a test of libcore.
2021-03-15 10:22:29 +01:00
Oli Scherer
6b1dd82162 Prepare mir::Constant for ty::Const only supporting valtrees 2021-03-12 12:43:54 +00:00
bors
1b1f6ea468 Auto merge of #76570 - cratelyn:implement-rfc-2945-c-unwind-abi, r=Amanieu
Implement RFC 2945: "C-unwind" ABI

## Implement RFC 2945: "C-unwind" ABI

This branch implements [RFC 2945]. The tracking issue for this RFC is #74990.

The feature gate for the issue is `#![feature(c_unwind)]`.

This RFC was created as part of the ffi-unwind project group tracked at rust-lang/lang-team#19.

### Changes

Further details will be provided in commit messages, but a high-level overview
of the changes follows:

* A boolean `unwind` payload is added to the `C`, `System`, `Stdcall`,
and `Thiscall` variants, marking whether unwinding across FFI boundaries is
acceptable. The cases where each of these variants' `unwind` member is true
correspond with the `C-unwind`, `system-unwind`, `stdcall-unwind`, and
`thiscall-unwind` ABI strings introduced in RFC 2945 [3].

* This commit adds a `c_unwind` feature gate for the new ABI strings.
Tests for this feature gate are included in `src/test/ui/c-unwind/`, which
ensure that this feature gate works correctly for each of the new ABIs.
A new language features entry in the unstable book is added as well.

* We adjust the `rustc_middle::ty::layout::fn_can_unwind` function,
used to compute whether or not a `FnAbi` object represents a function that
should be able to unwind when `panic=unwind` is in use.

* Changes are also made to
`rustc_mir_build::build::should_abort_on_panic` so that the function ABI is
used to determind whether it should abort, assuming that the `panic=unwind`
strategy is being used, and no explicit unwind attribute was provided.

[RFC 2945]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md
2021-03-10 16:44:04 +00:00