Commit graph

1839 commits

Author SHA1 Message Date
Camelid
57739b54cb Rename optin_builtin_traits to auto_traits
They were originally called "opt-in, built-in traits" (OIBITs), but
people realized that the name was too confusing and a mouthful, and so
they were renamed to just "auto traits". The feature flag's name wasn't
updated, though, so that's what this PR does.

There are some other spots in the compiler that still refer to OIBITs,
but I don't think changing those now is worth it since they are internal
and not particularly relevant to this PR.

Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
2020-11-23 14:14:06 -08:00
Lzu Tao
e4cc56d760 Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
Bastian Kauschke
56e63805be update cg_clif 2020-11-16 22:42:09 +01:00
Nicholas-Baron
a5ec85758b Changed unwrap_or to unwrap_or_else in some places.
The discussion seems to have resolved that this lint is a bit "noisy" in
that applying it in all places would result in a reduction in
readability.

A few of the trivial functions (like `Path::new`) are fine to leave
outside of closures.

The general rule seems to be that anything that is obviously an
allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it
is a 0-sized allocation.
2020-11-10 20:07:47 -08:00
Jonas Schievink
65ae469f8d Rollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum
rustc_target: Further cleanup use of target options

Follow up to https://github.com/rust-lang/rust/pull/77729.

Implements items 2 and 4 from the list in https://github.com/rust-lang/rust/pull/77729#issue-500228243.

The first commit collapses uses of `target.options.foo` into `target.foo`.

The second commit renames some target options to avoid tautology:
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`

r? `@Mark-Simulacrum`
2020-11-10 14:45:21 +01:00
Dylan DPC
806538fa78 Rollup merge of #78674 - tmiasko:inline-substs-for-mir-body, r=oli-obk
inliner: Use substs_for_mir_body

Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.

Resolves #78529.
Resolves #78560.
2020-11-09 01:13:42 +01:00
Vadim Petrochenkov
e9c34b3cf8 Collapse all uses of target.options.foo into target.foo
with an eye on merging `TargetOptions` into `Target`.

`TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-11-08 17:29:13 +03:00
Yuki Okushi
8a097f7b2c Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
Fix shellcheck error

## Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068
2020-11-07 01:02:14 +09:00
Daiki Ihara
07aef90593 fix shellcheck error of SC2068 2020-11-06 20:33:12 +09:00
Daiki Ihara
21a097f17e fix shellcheck error of SC2148 2020-11-06 20:33:12 +09:00
Tomasz Miąsko
f7e11cba36 inliner: Use substs_for_mir_body
Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.
2020-11-06 00:00:00 +00:00
Guillaume Gomez
d6f457d835 Fix even more URLs 2020-11-05 20:11:29 +01:00
oli
6e96e10f93 u64::try_from will now fail if ScalarInt isn't exactly 64 bits, thus we use to_bits with the correct size 2020-11-04 13:59:11 +00:00
oli
5fa1c8f91a u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
oli
0dcf78ba87 s/Scalar::Raw/Scalar::Int 2020-11-04 10:11:31 +00:00
oli
7e8b15e050 Fix cranelift build 2020-11-04 10:10:44 +00:00
bjorn3
285c7c66dc Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01 2020-11-03 11:00:04 +01:00
bjorn3
793d26047f Rustup to rustc 1.49.0-nightly (4760b8fb8 2020-10-25) 2020-10-26 09:51:48 +01:00
bjorn3
8ec977e763 Replace write with write_all 2020-10-25 13:33:39 +01:00
bjorn3
d2b8406c20 Remove unused trap_unimplemented_ret_value 2020-10-22 12:44:59 +02:00
bjorn3
8dc71a419e Rustup to rustc 1.49.0-nightly (1eaadebb3 2020-10-21) 2020-10-22 12:44:59 +02:00
Kitsu
04091772bc
Use architecture pointer size for AddConstructor (#1094)
* Use architecture pointer size for AddConstructor

* Update src/backend.rs

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2020-10-16 16:19:22 +02:00
bjorn3
0416f122aa Error on non-constant simd_insert/simd_extract index 2020-10-16 14:03:29 +02:00
bjorn3
4971028775 Rustup to rustc 1.49.0-nightly (dd7fc54eb 2020-10-15) 2020-10-16 09:35:48 +02:00
bjorn3
1c7c591cb8 Fix compilation for non-unix systems 2020-10-15 18:51:49 +02:00
bjorn3
1c272b1224 Fix a compilation error in debug mode 2020-10-15 18:49:50 +02:00
bjorn3
7045b101cc Use MetadataRef in the metadata loader to fix parallel rustc 2020-10-15 16:15:04 +02:00
bjorn3
1c40840738 Fix warning 2020-10-15 15:39:06 +02:00
bjorn3
fed612c75a Output clif ir to output dir instead of hardcoded path
This is necessary for reproducable builds.
2020-10-15 10:57:56 +02:00
bjorn3
a233646dfc Rustup to rustc 1.49.0-nightly (e160e5cb8 2020-10-14) 2020-10-15 10:34:13 +02:00
bjorn3
6258b86c40 Rustup to rustc 1.49.0-nightly (c71248b70 2020-10-11) 2020-10-12 14:23:36 +02:00
bjorn3
2f2d3b2fd4 Avoid iadd for ptr const val with zero offset 2020-10-12 12:04:17 +02:00
bjorn3
cd2fc77b0e Make _rust_extern_with_linkage_* readonly 2020-10-12 12:04:17 +02:00
bjorn3
e0002c1892 Remove MIR dump on panic
I haven't used it for a long time and it adds a lot of noise to the
panic print.
2020-10-11 13:24:14 +02:00
bjorn3
8ebfc9142f Fix rust-analyzer.linkedProjects paths 2020-10-11 13:19:39 +02:00
bjorn3
6e8ea1c049 Abort earlier when an error happens in jit mode 2020-10-11 11:31:36 +02:00
bjorn3
96d76eb8e4 Update dependencies 2020-10-11 11:20:15 +02:00
bjorn3
9683c42cde Update Cranelift 2020-10-11 11:14:08 +02:00
bjorn3
783c6771b3 Rustup to rustc 1.49.0-nightly (b1af43bc6 2020-10-10) 2020-10-11 10:58:26 +02:00
bjorn3
faec12461f Use custom driver for sysroot building too
This required another custom driver to ensure that build scripts are
built using cg_llvm instead of cg_clif.

After this change only rustdoc still uses -Zcodegen-backend
2020-10-10 16:41:31 +02:00
bjorn3
c352f91b40 Rustfmt 2020-10-09 19:17:52 +02:00
bjorn3
e910a24d44
Merge pull request #1093 from bjorn3/use_new_module_interface
Use the new cranelift-module interface
2020-10-08 19:22:15 +02:00
bjorn3
0a5968dfd2 Use the new cranelift-module interface
This updates Cranelift to include bytecodealliance/wasmtime#2249
2020-10-08 19:00:21 +02:00
bjorn3
1cd63dc9b2 Update sysroot miniz_oxide 2020-10-08 13:37:02 +02:00
bjorn3
cb2dd4b5e0 Update rust-analyzer config for changed path 2020-10-05 11:14:10 +02:00
bjorn3
832b3117cc Install rustfmt by default when doing a rustup 2020-10-05 11:13:11 +02:00
bjorn3
3fc673d0a9 Rustup to rustc 1.49.0-nightly (beb5ae474 2020-10-04) 2020-10-05 11:12:41 +02:00
bjorn3
ab92638735 Rustup to rustc 1.48.0-nightly (8fe73e80d 2020-10-01) 2020-10-02 14:26:34 +02:00
bjorn3
3b60cc4eb1 Prevent usage of sccache
It doesn't detect cg_clif as a rust compiler

Fixes #1091
2020-09-30 09:16:14 +02:00
bjorn3
0c065f9560
Merge pull request #1089 from bjorn3/custom_driver
Add custom rustc driver that uses cg_clif
2020-09-29 23:52:59 +02:00