Commit Graph

2169 Commits

Author SHA1 Message Date
bjorn3
80e9188fb1 Rewrite cargo.sh in rust 2021-06-20 12:56:47 +02:00
bjorn3
9fd8fa2123 Move some things from config.sh to ext_config.sh 2021-06-19 14:51:48 +02:00
bjorn3
d571910f4d Give an error when attempting to build for MSVC 2021-06-19 14:07:56 +02:00
bjorn3
bc67726882 Update rust-analyzer import assist config 2021-06-19 13:59:25 +02:00
bjorn3
b0d7b526d9 [CI] Test compilation on Windows 2021-06-19 13:59:13 +02:00
bjorn3
e5563b5077 Improve windows support 2021-06-19 13:58:32 +02:00
bjorn3
0d6b3dab65 Allow preserving the old sysroot 2021-06-19 13:58:32 +02:00
bjorn3
ad971bbed7 Rewrite build_sysroot.sh in rust 2021-06-19 13:58:32 +02:00
bjorn3
d71b12535e Merge the crate_patches dir into the patches dir 2021-06-19 13:58:32 +02:00
bjorn3
066d5f952c Rewrite prepare_sysroot_src.sh in rust 2021-06-19 13:58:32 +02:00
bjorn3
fe6a2892a6 Rewrite prepare.sh in rust 2021-06-19 13:54:25 +02:00
bjorn3
2db4e50618 Rewrite build.sh in rust
This makes it easier to compile cg_clif on systems that don't support
bash shell scripts like Windows
2021-06-19 13:54:25 +02:00
bjorn3
0ddb937624 Update rust patch for compiler_builtins update 2021-06-17 18:42:09 +02:00
bjorn3
ab7f1c8a0e Fix miscompilation in vtable access
Fixes #1179
2021-06-17 18:41:43 +02:00
bjorn3
a12e23bc7e Rustup to rustc 1.55.0-nightly (a85f584ae 2021-06-16) 2021-06-17 15:36:32 +02:00
bjorn3
b0d1f50301 Sync from rust b17d9c1332 2021-06-17 15:22:37 +02:00
bors
9be7ca00f1 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`
2021-06-16 07:20:27 +00:00
Alexander
432285fbc6
Implement llvm.x86.addcarry.64 and llvm.x86.subborrow.64 (#1178) 2021-06-15 13:41:46 +02:00
LeSeulArtichaut
8923e42a05 Use the now available implementation of IntoIterator for arrays 2021-06-14 23:40:09 +02:00
Charles Lew
d3e123fc4f Refactor to make interpreter and codegen backend neutral to vtable internal representation. 2021-06-15 01:59:00 +08:00
bjorn3
75eff64977 Enable cross-compilation support in Cranelift 2021-06-10 12:18:10 +02:00
bjorn3
4492f32d15 Update Cranelift and object 2021-06-10 12:17:42 +02:00
bjorn3
ae1bcb209a Use -Cprefer-dynamic for all crates in jit mode 2021-06-10 11:18:59 +02:00
bjorn3
84dd22969f Include rustc and cranelift version in debuginfo 2021-06-10 11:18:59 +02:00
bjorn3
b7180ae39a Add missing cargo clean when cross-compiling 2021-06-10 11:18:59 +02:00
bors
fa7545e49b Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011
Drop metadata_encoding_version.

Part of #85153

r? `@Aaron1011`
2021-06-10 00:39:25 +00:00
bjorn3
0d68742d37 Ignore unsupported test 2021-06-08 20:12:29 +02:00
bjorn3
a6cce19659 Rustup to rustc 1.54.0-nightly (e4a603270 2021-06-07) 2021-06-08 19:36:12 +02:00
bjorn3
dee7c7b075 Sync from rust a50d72158e 2021-06-08 19:22:10 +02:00
Yuki Okushi
8224e72fbc 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.
2021-06-07 15:21:03 +09:00
bors
ab73115be0 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.
2021-06-07 02:30:24 +00:00
Luqman Aden
20beb55565 Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}. 2021-06-05 21:59:41 -07:00
bors
df47bce145 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.
2021-06-06 03:59:17 +00:00
bors
d7db869e7d 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.
2021-06-06 01:02:32 +00:00
bjorn3
bc9926a29b Remove unused dylib_ext variable from build.sh 2021-06-05 18:29:28 +02:00
Richard Cobbe
1248ff139d 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.
2021-06-04 18:01:35 -07:00
bjorn3
dbdeafbc26 Move crate_name field from OngoingCodegen to CrateInfo 2021-06-04 13:20:05 +02:00
bjorn3
646c6043a7 Move windows_subsystem field from CodegenResults to CrateInfo 2021-06-04 13:20:04 +02:00
bjorn3
b6f0b46e20 Allow printing the version of the default codegen backend if it isn't llvm 2021-06-04 13:20:04 +02:00
bjorn3
20e9a1372b Provide default MetadataLoader 2021-06-04 13:20:04 +02:00
bjorn3
b10a442405 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.
2021-06-04 13:20:04 +02:00
Camille GILLOT
f4eb0170aa Drop metadata_encoding_version. 2021-06-01 21:12:27 +02:00
Camille Gillot
d8d6a5aee0 Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
Camille GILLOT
228f1c549d Drop metadata_encoding_version. 2021-05-30 20:05:46 +02:00
Camille GILLOT
4e62376059 Make allocator_kind a query. 2021-05-30 19:58:01 +02:00
bjorn3
d6b03451e6 Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27 2021-05-27 13:08:14 +02:00
bjorn3
40dd3e2b70 Rustfmt 2021-05-27 12:40:08 +02:00
bjorn3
56facc424a Rustup to rustc 1.54.0-nightly (ff2c947c0 2021-05-25) 2021-05-27 12:39:40 +02:00
bjorn3
e20fe219e6 Sync from rust 1969c2e312 2021-05-26 14:01:50 +02:00
bjorn3
39ffd9ae4a Allow switching the regalloc algorithm from the commandline 2021-05-26 14:00:58 +02:00