]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoSync from rust b09dad3eddfc46c55e45f6c1a00bab09401684b4
bjorn3 [Tue, 6 Jul 2021 16:59:42 +0000 (18:59 +0200)]
Sync from rust b09dad3eddfc46c55e45f6c1a00bab09401684b4

3 years agoPass CrateInfo instead of TyCtxt to load_imported_symbols_for_jit
bjorn3 [Mon, 5 Jul 2021 16:46:13 +0000 (18:46 +0200)]
Pass CrateInfo instead of TyCtxt to load_imported_symbols_for_jit

3 years agoRustfmt
bjorn3 [Mon, 5 Jul 2021 16:44:37 +0000 (18:44 +0200)]
Rustfmt

3 years agoRemove LibSource
bjorn3 [Mon, 7 Jun 2021 10:18:28 +0000 (12:18 +0200)]
Remove LibSource

The information is stored in used_crate_source too anyway

3 years agoDon't overwrite LD_LIBRARY_PATH in config.sh
bjorn3 [Sun, 4 Jul 2021 16:17:26 +0000 (18:17 +0200)]
Don't overwrite LD_LIBRARY_PATH in config.sh

3 years agoRefactor cg_clif building
bjorn3 [Sun, 4 Jul 2021 16:15:13 +0000 (18:15 +0200)]
Refactor cg_clif building

3 years agoBetter config parsing and allow specifying host and target triple in config
bjorn3 [Sun, 4 Jul 2021 13:10:06 +0000 (15:10 +0200)]
Better config parsing and allow specifying host and target triple in config

3 years agoWrite better clif ir header
bjorn3 [Sun, 4 Jul 2021 10:39:22 +0000 (12:39 +0200)]
Write better clif ir header

3 years agoUpdate Cranelift
bjorn3 [Sun, 4 Jul 2021 10:37:00 +0000 (12:37 +0200)]
Update Cranelift

This has a fix for a miscompilation on AArch64

cc #1184

3 years agoMake vtable_allocation always succeed
Smitty [Sat, 3 Jul 2021 15:14:19 +0000 (11:14 -0400)]
Make vtable_allocation always succeed

3 years agoUpdate Cranelift
bjorn3 [Sat, 3 Jul 2021 12:41:33 +0000 (14:41 +0200)]
Update Cranelift

3 years agoMisc target related improvements
bjorn3 [Sat, 3 Jul 2021 12:28:53 +0000 (14:28 +0200)]
Misc target related improvements

3 years agoCheck if the patched sysroot source is up to date before using it
bjorn3 [Fri, 2 Jul 2021 17:14:02 +0000 (19:14 +0200)]
Check if the patched sysroot source is up to date before using it

Fixes #1181

3 years agoMerge pull request #1183 from bjorn3/full_aarch64_support
bjorn3 [Fri, 2 Jul 2021 13:03:16 +0000 (15:03 +0200)]
Merge pull request #1183 from bjorn3/full_aarch64_support

AArch64 support on Linux

3 years ago[CI] Cross compile to aarch64-unknown-linux-gnu
bjorn3 [Fri, 2 Jul 2021 12:43:01 +0000 (14:43 +0200)]
[CI] Cross compile to aarch64-unknown-linux-gnu

3 years ago[CI] Split build and test steps
bjorn3 [Fri, 2 Jul 2021 10:54:09 +0000 (12:54 +0200)]
[CI] Split build and test steps

3 years agoFix rust-analyzer setting
bjorn3 [Fri, 2 Jul 2021 10:39:34 +0000 (12:39 +0200)]
Fix rust-analyzer setting

3 years agoFix compilation for AArch64
bjorn3 [Tue, 29 Jun 2021 18:37:06 +0000 (20:37 +0200)]
Fix compilation for AArch64

3 years agoOnly test global_asm on x86_64
bjorn3 [Fri, 25 Jun 2021 17:18:53 +0000 (19:18 +0200)]
Only test global_asm on x86_64

3 years agoUpdate Cranelift and object
bjorn3 [Fri, 25 Jun 2021 17:18:17 +0000 (19:18 +0200)]
Update Cranelift and object

This adds AArch64 support for unixes using ELF object files like Linux

3 years agoDon't use data object for non-primitive scalars
bjorn3 [Fri, 2 Jul 2021 10:07:08 +0000 (12:07 +0200)]
Don't use data object for non-primitive scalars

Fixes #1041

3 years agoDisable new rustc test requiring unwinding support
bjorn3 [Fri, 2 Jul 2021 09:32:27 +0000 (11:32 +0200)]
Disable new rustc test requiring unwinding support

3 years agoReduce duplication of vtables
bjorn3 [Thu, 1 Jul 2021 10:05:10 +0000 (12:05 +0200)]
Reduce duplication of vtables

3 years agoRustup to rustc 1.55.0-nightly (6d820866a 2021-06-29)
bjorn3 [Wed, 30 Jun 2021 19:21:06 +0000 (21:21 +0200)]
Rustup to rustc 1.55.0-nightly (6d820866a 2021-06-29)

3 years agofix sess error
Smitty [Tue, 29 Jun 2021 23:17:14 +0000 (19:17 -0400)]
fix sess error

This passed x.py check locally, not sure why it wasn't rebased right...

3 years agoSupport allocation failures when interperting MIR
Smitty [Sat, 12 Jun 2021 23:49:48 +0000 (19:49 -0400)]
Support allocation failures when interperting MIR

Note that this breaks Miri.

Closes #79601

3 years agoSync from rust e98897e5dc9898707bf4331c43b2e76ab7e282fe
bjorn3 [Tue, 29 Jun 2021 18:38:04 +0000 (20:38 +0200)]
Sync from rust e98897e5dc9898707bf4331c43b2e76ab7e282fe

3 years agoAuto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
bors [Tue, 29 Jun 2021 15:52:21 +0000 (15:52 +0000)]
Auto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3

Change vtable memory representation to use tcx allocated allocations.

This fixes https://github.com/rust-lang/rust/issues/86324. However i suspect there's more to change before it can land.

r? `@bjorn3`
cc `@rust-lang/miri`

3 years agoUpdate other codegens to use tcx managed vtable allocations.
Charles Lew [Sun, 20 Jun 2021 09:43:25 +0000 (17:43 +0800)]
Update other codegens to use tcx managed vtable allocations.

3 years agoAuto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011
bors [Mon, 28 Jun 2021 01:20:01 +0000 (01:20 +0000)]
Auto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011

Make allocator_kind a query.

Part of #85153

r? `@Aaron1011`

3 years agoMerge pull request #1166 from eggyal/lazy-jit-multithreaded
bjorn3 [Fri, 25 Jun 2021 16:33:00 +0000 (18:33 +0200)]
Merge pull request #1166 from eggyal/lazy-jit-multithreaded

Multithreading support for lazy-jit

3 years agoTest multithreading support in lazy-jit
bjorn3 [Fri, 25 Jun 2021 15:49:43 +0000 (17:49 +0200)]
Test multithreading support in lazy-jit

3 years agoAuto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726
bors [Fri, 25 Jun 2021 04:06:32 +0000 (04:06 +0000)]
Auto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726

Allow changing the bug report url for the ice hook

cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1174

3 years agoRemove unused variable
bjorn3 [Sun, 20 Jun 2021 16:26:17 +0000 (18:26 +0200)]
Remove unused variable

3 years agoMerge pull request #1180 from bjorn3/rust_build_system
bjorn3 [Sun, 20 Jun 2021 12:55:36 +0000 (14:55 +0200)]
Merge pull request #1180 from bjorn3/rust_build_system

Rewrite part of the build system in rust

3 years agoRemove unnecessary LD_LIBRARY_PATH parts
bjorn3 [Sun, 20 Jun 2021 12:40:49 +0000 (14:40 +0200)]
Remove unnecessary LD_LIBRARY_PATH parts

3 years agoFix compiling cargo.rs on windows
bjorn3 [Sun, 20 Jun 2021 11:20:51 +0000 (13:20 +0200)]
Fix compiling cargo.rs on windows

3 years agoRewrite cargo.sh in rust
bjorn3 [Sun, 20 Jun 2021 10:41:40 +0000 (12:41 +0200)]
Rewrite cargo.sh in rust

3 years agoMake allocator_kind a query.
Camille GILLOT [Tue, 11 May 2021 20:05:54 +0000 (22:05 +0200)]
Make allocator_kind a query.

3 years agoMove some things from config.sh to ext_config.sh
bjorn3 [Sat, 19 Jun 2021 12:51:48 +0000 (14:51 +0200)]
Move some things from config.sh to ext_config.sh

3 years agoGive an error when attempting to build for MSVC
bjorn3 [Sat, 19 Jun 2021 12:07:56 +0000 (14:07 +0200)]
Give an error when attempting to build for MSVC

3 years agoUpdate rust-analyzer import assist config
bjorn3 [Fri, 18 Jun 2021 14:18:44 +0000 (16:18 +0200)]
Update rust-analyzer import assist config

3 years ago[CI] Test compilation on Windows
bjorn3 [Fri, 18 Jun 2021 11:41:20 +0000 (13:41 +0200)]
[CI] Test compilation on Windows

3 years agoImprove windows support
bjorn3 [Fri, 18 Jun 2021 11:38:50 +0000 (13:38 +0200)]
Improve windows support

3 years agoAllow preserving the old sysroot
bjorn3 [Fri, 18 Jun 2021 11:35:58 +0000 (13:35 +0200)]
Allow preserving the old sysroot

3 years agoRewrite build_sysroot.sh in rust
bjorn3 [Fri, 18 Jun 2021 11:27:56 +0000 (13:27 +0200)]
Rewrite build_sysroot.sh in rust

3 years agoMerge the crate_patches dir into the patches dir
bjorn3 [Wed, 16 Jun 2021 16:28:34 +0000 (18:28 +0200)]
Merge the crate_patches dir into the patches dir

3 years agoRewrite prepare_sysroot_src.sh in rust
bjorn3 [Wed, 16 Jun 2021 16:01:19 +0000 (18:01 +0200)]
Rewrite prepare_sysroot_src.sh in rust

3 years agoRewrite prepare.sh in rust
bjorn3 [Fri, 11 Jun 2021 16:50:01 +0000 (18:50 +0200)]
Rewrite prepare.sh in rust

3 years agoRewrite build.sh in rust
bjorn3 [Tue, 8 Jun 2021 12:33:25 +0000 (14:33 +0200)]
Rewrite build.sh in rust

This makes it easier to compile cg_clif on systems that don't support
bash shell scripts like Windows

3 years agoUpdate rust patch for compiler_builtins update
bjorn3 [Thu, 17 Jun 2021 16:42:09 +0000 (18:42 +0200)]
Update rust patch for compiler_builtins update

3 years agoFix miscompilation in vtable access
bjorn3 [Thu, 17 Jun 2021 16:41:43 +0000 (18:41 +0200)]
Fix miscompilation in vtable access

Fixes #1179

3 years agoRustup to rustc 1.55.0-nightly (a85f584ae 2021-06-16)
bjorn3 [Thu, 17 Jun 2021 13:36:32 +0000 (15:36 +0200)]
Rustup to rustc 1.55.0-nightly (a85f584ae 2021-06-16)

3 years agoSync from rust b17d9c1332693fc386f5374f0d63aae0ce5abab5
bjorn3 [Thu, 17 Jun 2021 13:22:37 +0000 (15:22 +0200)]
Sync from rust b17d9c1332693fc386f5374f0d63aae0ce5abab5

3 years agoRemove lack of mulithreading support from usage.md
Alan Egerton [Thu, 17 Jun 2021 08:51:04 +0000 (09:51 +0100)]
Remove lack of mulithreading support from usage.md

3 years agoEnsure Instances are only jitted once
Alan Egerton [Wed, 28 Apr 2021 23:01:59 +0000 (00:01 +0100)]
Ensure Instances are only jitted once

3 years agoMultithreading support for lazy-jit
Alan Egerton [Wed, 28 Apr 2021 13:44:18 +0000 (14:44 +0100)]
Multithreading support for lazy-jit

3 years agoAuto merge of #86291 - crlf0710:trait_vtbl_refactor, r=bjorn3
bors [Wed, 16 Jun 2021 07:20:27 +0000 (07:20 +0000)]
Auto merge of #86291 - crlf0710:trait_vtbl_refactor, r=bjorn3

Refactor vtable codegen

This refactor the codegen of vtables of miri interpreter, llvm, cranelift codegen backends.

This is preparation for the implementation of trait upcasting feature. cc #65991

Note that aside from code reorganization, there's an internal behavior change here that now InstanceDef::Virtual's index now include the three metadata slots, and now the first method is with index 3.

cc  `@RalfJung` `@bjorn3`

3 years agoImplement llvm.x86.addcarry.64 and llvm.x86.subborrow.64 (#1178)
Alexander [Tue, 15 Jun 2021 11:41:46 +0000 (13:41 +0200)]
Implement llvm.x86.addcarry.64 and llvm.x86.subborrow.64 (#1178)

3 years agoUse the now available implementation of `IntoIterator` for arrays
LeSeulArtichaut [Mon, 14 Jun 2021 21:40:09 +0000 (23:40 +0200)]
Use the now available implementation of `IntoIterator` for arrays

3 years agoRefactor to make interpreter and codegen backend neutral to vtable internal represent...
Charles Lew [Mon, 14 Jun 2021 10:02:53 +0000 (18:02 +0800)]
Refactor to make interpreter and codegen backend neutral to vtable internal representation.

3 years agoEnable cross-compilation support in Cranelift
bjorn3 [Thu, 10 Jun 2021 10:18:10 +0000 (12:18 +0200)]
Enable cross-compilation support in Cranelift

3 years agoUpdate Cranelift and object
bjorn3 [Thu, 10 Jun 2021 10:17:42 +0000 (12:17 +0200)]
Update Cranelift and object

3 years agoUse -Cprefer-dynamic for all crates in jit mode
bjorn3 [Thu, 10 Jun 2021 08:46:00 +0000 (10:46 +0200)]
Use -Cprefer-dynamic for all crates in jit mode

3 years agoInclude rustc and cranelift version in debuginfo
bjorn3 [Thu, 10 Jun 2021 08:19:58 +0000 (10:19 +0200)]
Include rustc and cranelift version in debuginfo

3 years agoAdd missing cargo clean when cross-compiling
bjorn3 [Thu, 10 Jun 2021 08:16:49 +0000 (10:16 +0200)]
Add missing cargo clean when cross-compiling

3 years agoAuto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011
bors [Thu, 10 Jun 2021 00:39:25 +0000 (00:39 +0000)]
Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011

Drop metadata_encoding_version.

Part of #85153

r? `@Aaron1011`

3 years agoIgnore unsupported test
bjorn3 [Tue, 8 Jun 2021 18:12:29 +0000 (20:12 +0200)]
Ignore unsupported test

3 years agoRustup to rustc 1.54.0-nightly (e4a603270 2021-06-07)
bjorn3 [Tue, 8 Jun 2021 17:36:12 +0000 (19:36 +0200)]
Rustup to rustc 1.54.0-nightly (e4a603270 2021-06-07)

3 years agoSync from rust a50d72158e08e02cfc051b863017bdbd2c45b637
bjorn3 [Tue, 8 Jun 2021 17:22:10 +0000 (19:22 +0200)]
Sync from rust a50d72158e08e02cfc051b863017bdbd2c45b637

3 years agoRollup merge of #86016 - luqmana:infer-linker-flavor, r=petrochenkov
Yuki Okushi [Mon, 7 Jun 2021 06:21:03 +0000 (15:21 +0900)]
Rollup merge of #86016 - luqmana:infer-linker-flavor, r=petrochenkov

Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.

The two methods were exactly the same so this removes the cranelift copy. This will help make sure both they don't get out of sync.

3 years agoAuto merge of #85810 - bjorn3:further_driver_cleanup, r=varkor
bors [Mon, 7 Jun 2021 02:30:24 +0000 (02:30 +0000)]
Auto merge of #85810 - bjorn3:further_driver_cleanup, r=varkor

Driver improvements

This PR contains a couple of cleanups for the driver and a few small improvements for the custom codegen backend interface. It also implements `--version` and `-Cpasses=list` support for custom codegen backends.

3 years agoUnify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.
Luqman Aden [Sat, 5 Jun 2021 02:47:28 +0000 (19:47 -0700)]
Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.

3 years agoAuto merge of #84171 - ricobbe:raw-dylib-via-llvm, r=petrochenkov
bors [Sun, 6 Jun 2021 03:59:17 +0000 (03:59 +0000)]
Auto merge of #84171 - ricobbe:raw-dylib-via-llvm, r=petrochenkov

Partial support for raw-dylib linkage

First cut of functionality for issue #58713: add support for `#[link(kind = "raw-dylib")]` on `extern` blocks in lib crates compiled to .rlib files.  Does not yet support `#[link_name]` attributes on functions, or the `#[link_ordinal]` attribute, or `#[link(kind = "raw-dylib")]` on `extern` blocks in bin crates; I intend to publish subsequent PRs to fill those gaps.  It's also not yet clear whether this works for functions in `extern "stdcall"` blocks; I also intend to investigate that shortly and make any necessary changes as a follow-on PR.

This implementation calls out to an LLVM function to construct the actual `.idata` sections as temporary `.lib` files on disk and then links those into the generated .rlib.

3 years agoAuto merge of #79608 - alessandrod:bpf, r=nagisa
bors [Sun, 6 Jun 2021 01:02:32 +0000 (01:02 +0000)]
Auto merge of #79608 - alessandrod:bpf, r=nagisa

BPF target support

This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker.

I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.

3 years agoRemove unused dylib_ext variable from build.sh
bjorn3 [Sat, 5 Jun 2021 16:29:28 +0000 (18:29 +0200)]
Remove unused dylib_ext variable from build.sh

3 years agoAdd first cut of functionality for #58713: support for #[link(kind = "raw-dylib")].
Richard Cobbe [Mon, 8 Mar 2021 20:42:54 +0000 (12:42 -0800)]
Add first cut of functionality for #58713: support for #[link(kind = "raw-dylib")].

This does not yet support #[link_name] attributes on functions, the #[link_ordinal]
attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or
stdcall functions on 32-bit x86.

3 years agoMove crate_name field from OngoingCodegen to CrateInfo
bjorn3 [Sat, 29 May 2021 15:37:38 +0000 (17:37 +0200)]
Move crate_name field from OngoingCodegen to CrateInfo

3 years agoMove windows_subsystem field from CodegenResults to CrateInfo
bjorn3 [Sat, 29 May 2021 15:08:46 +0000 (17:08 +0200)]
Move windows_subsystem field from CodegenResults to CrateInfo

3 years agoAllow printing the version of the default codegen backend if it isn't llvm
bjorn3 [Sat, 29 May 2021 13:14:05 +0000 (15:14 +0200)]
Allow printing the version of the default codegen backend if it isn't llvm

3 years agoProvide default MetadataLoader
bjorn3 [Sat, 29 May 2021 13:00:18 +0000 (15:00 +0200)]
Provide default MetadataLoader

3 years agoProvide a default provide* implementation for CodegenBackend
bjorn3 [Sat, 29 May 2021 12:51:27 +0000 (14:51 +0200)]
Provide a default provide* implementation for CodegenBackend

Both cg_llvm and cg_clif don't override it. cg_spirv does override it,
so it needs to be preserved.

3 years agoDrop metadata_encoding_version.
Camille GILLOT [Sat, 29 May 2021 20:49:59 +0000 (22:49 +0200)]
Drop metadata_encoding_version.

3 years agoRevert "Reduce the amount of untracked state in TyCtxt"
Camille Gillot [Tue, 1 Jun 2021 07:05:22 +0000 (09:05 +0200)]
Revert "Reduce the amount of untracked state in TyCtxt"

3 years agoDrop metadata_encoding_version.
Camille GILLOT [Sat, 29 May 2021 20:49:59 +0000 (22:49 +0200)]
Drop metadata_encoding_version.

3 years agoMake allocator_kind a query.
Camille GILLOT [Tue, 11 May 2021 20:05:54 +0000 (22:05 +0200)]
Make allocator_kind a query.

3 years agoMerge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
bjorn3 [Thu, 27 May 2021 11:08:14 +0000 (13:08 +0200)]
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27

3 years agoRustfmt
bjorn3 [Thu, 27 May 2021 10:40:08 +0000 (12:40 +0200)]
Rustfmt

3 years agoRustup to rustc 1.54.0-nightly (ff2c947c0 2021-05-25)
bjorn3 [Thu, 27 May 2021 10:39:40 +0000 (12:39 +0200)]
Rustup to rustc 1.54.0-nightly (ff2c947c0 2021-05-25)

3 years agoSync from rust 1969c2e312303faa458cf19dad9783165e3c72c8
bjorn3 [Wed, 26 May 2021 12:01:50 +0000 (14:01 +0200)]
Sync from rust 1969c2e312303faa458cf19dad9783165e3c72c8

3 years agoAllow switching the regalloc algorithm from the commandline
bjorn3 [Wed, 26 May 2021 12:00:58 +0000 (14:00 +0200)]
Allow switching the regalloc algorithm from the commandline

3 years agoChange the ice hook for cg_clif to refer to cg_clif's issue tracker
bjorn3 [Mon, 24 May 2021 16:55:30 +0000 (18:55 +0200)]
Change the ice hook for cg_clif to refer to cg_clif's issue tracker

3 years agoRustfmt
bjorn3 [Mon, 24 May 2021 16:41:45 +0000 (18:41 +0200)]
Rustfmt

3 years agoUpdate rustc bootstrap patch
bjorn3 [Mon, 24 May 2021 15:16:45 +0000 (17:16 +0200)]
Update rustc bootstrap patch

3 years agoUpdate Cranelift, object and gimli
bjorn3 [Mon, 24 May 2021 14:06:54 +0000 (16:06 +0200)]
Update Cranelift, object and gimli

3 years ago(try to) fix cranelift
Ralf Jung [Sun, 23 May 2021 10:44:05 +0000 (12:44 +0200)]
(try to) fix cranelift

3 years agoAdd BPF target
Alessandro Decina [Mon, 30 Nov 2020 19:41:57 +0000 (19:41 +0000)]
Add BPF target

This change adds the bpfel-unknown-none and bpfeb-unknown-none targets
which can be used to generate little endian and big endian BPF

3 years agoRustup to rustc 1.54.0-nightly (3e99439f4 2021-05-17)
bjorn3 [Tue, 18 May 2021 17:51:31 +0000 (19:51 +0200)]
Rustup to rustc 1.54.0-nightly (3e99439f4 2021-05-17)

3 years agoSync from rust a5560a6a90f08a84728802bb5fa5632a17a78672
bjorn3 [Tue, 18 May 2021 17:42:37 +0000 (19:42 +0200)]
Sync from rust a5560a6a90f08a84728802bb5fa5632a17a78672

3 years agoMove some code around a bit
bjorn3 [Tue, 18 May 2021 17:41:04 +0000 (19:41 +0200)]
Move some code around a bit