Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cg_clif as optional codegen backend #77975

Merged
merged 1,724 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1724 commits
Select commit Hold shift + click to select a range
af0fa74
[CI] Run the compile step with CARGO_INCREMENTAL=1
bjorn3 Jun 16, 2020
b614448
Revert "[CI] Run the compile step with CARGO_INCREMENTAL=1"
bjorn3 Jun 16, 2020
daad966
Some changes necessary for Windows support
bjorn3 Jun 16, 2020
282e305
Only run ranlib when necessary
bjorn3 Jun 16, 2020
d4187e6
Make mini_core_hello_world work on Windows once TLS is supported
bjorn3 Jun 16, 2020
3086e44
Only call build_value_labels_ranges when necessary
bjorn3 Jun 16, 2020
266ca93
Rustup to rustc 1.46.0-nightly (2d8bd9b74 2020-06-19)
bjorn3 Jun 20, 2020
b4d9d8a
Update Cranelift
bjorn3 Jun 20, 2020
f718378
Ignore libcore test that requires unwinding support
bjorn3 Jun 20, 2020
5c6bf83
Implement #[link_section]
bjorn3 Jun 20, 2020
ef4186a
Use Cranelift legalization for icmp.i128
bjorn3 Jun 20, 2020
177348f
Unignore some more libcore tests
bjorn3 Jun 20, 2020
5f54cc7
Implement checked_mul
bjorn3 Jun 20, 2020
392348d
Ignore less of the libcore float tests
bjorn3 Jun 20, 2020
431cebd
Introduce #[cfg(target_feature = "cg_clif")]
bjorn3 Jun 20, 2020
eb8fd19
Prelude cleanup
bjorn3 Jun 20, 2020
fc5e583
Warn on unsupported pass modes for extern "C"
bjorn3 Jun 20, 2020
b79102c
Disable "LTO is not supported" warning for sysroot build
bjorn3 Jun 20, 2020
9c0d18c
Simplify assert_assignable
bjorn3 Jun 21, 2020
1f3dd4f
Prevent different vtables with the same name
bjorn3 Jun 23, 2020
f77fab8
Rustup to rustc 1.46.0-nightly (6bb3dbfc6 2020-06-22)
bjorn3 Jun 24, 2020
98c83d2
Remove leftover of removed hack
bjorn3 Jun 24, 2020
a3cd293
Don't perform a double substitution in some cases
bjorn3 Jun 24, 2020
eda840a
Longer README about how to use this instead of `cargo run` (#1054)
vi Jun 25, 2020
58ffc47
Add goal and better current status to readme
bjorn3 Jun 25, 2020
48d4bc2
Rustup to rustc 1.46.0-nightly (7750c3d46 2020-06-26)
bjorn3 Jun 27, 2020
ef92432
Update Cranelift
bjorn3 Jun 27, 2020
4bfc4a1
Update dependencies
bjorn3 Jun 27, 2020
3227203
Don't use a 1-to-1 mapping between mir local and cranelift_frontend v…
bjorn3 Jun 27, 2020
57d9dda
Rustup to rustc 1.46.0-nightly (0ca7f74db 2020-06-29)
bjorn3 Jun 30, 2020
c1b1a5a
Update cc
bjorn3 Jun 30, 2020
5262fec
Update Cranelift
bjorn3 Jun 30, 2020
de336e1
Fix trap_unreachable_ret_value
bjorn3 Apr 30, 2020
aa6a4ac
Fix ptr_offset_from intrinsic
bjorn3 May 1, 2020
e2ab288
Mark allocations as mutable when necessary
bjorn3 May 1, 2020
cc0268f
Mask shift amount
bjorn3 May 1, 2020
bf2ba15
When casting enum to integer sign extend the discriminant if necessary
bjorn3 May 1, 2020
f5f24c7
Implement a few volatile intrinsics
bjorn3 May 1, 2020
c674a32
Implement f*_fast intrinsics
bjorn3 May 1, 2020
eb89a2c
Implement float_to_int_unchecked intrinsic
bjorn3 May 10, 2020
6e2ac83
Merge pull request #1056 from bjorn3/misc_fixes
bjorn3 Jun 30, 2020
a299d0e
Don't panic on unevaluatable promoted constants
bjorn3 Apr 30, 2020
f3a9116
Rustup to rustc 1.46.0-nightly (f781babf8 2020-07-01)
bjorn3 Jul 2, 2020
bc96649
Update Cranelift
bjorn3 Jul 2, 2020
aa80ed0
Store pairs in SSA
spastorino Jul 2, 2020
9ec2be7
Extract transmute_value as a function to avoid code repetition
spastorino Jul 3, 2020
ef01b4e
Store fat pointers in ssa variables
spastorino Jul 3, 2020
d032c24
Merge pull request #1057 from spastorino/store-pairs-in-ssa
bjorn3 Jul 3, 2020
21edec4
Fix core::hint::black_box support
bjorn3 Jul 3, 2020
798fb85
Fix assert_assignable
bjorn3 Jul 3, 2020
92dc61a
Only display codegen time when CG_CLIF_DISPLAY_CG_TIME=1
bjorn3 Jul 3, 2020
4ada18f
Add sess.abort_if_errors() to link
bjorn3 Jul 3, 2020
8d639cd
Test signed 128bit discriminants
bjorn3 Jul 3, 2020
699da39
Validate simd and atomic intrinsic types
bjorn3 Jul 3, 2020
6345e4a
Implement variant_count intrinisic
bjorn3 Jul 3, 2020
05fc1f4
Merge pull request #1058 from bjorn3/misc_rustc_test_suite_fixes
bjorn3 Jul 3, 2020
6089a68
Account for Rvalue::AddressOf in analyze
bjorn3 Jul 3, 2020
bbe8bed
Rustup to rustc 1.46.0-nightly (8aa18cbdc 2020-07-08)
bjorn3 Jul 9, 2020
8e51964
Update Cranelift
bjorn3 Jul 9, 2020
b6150be
Update dependencies
bjorn3 Jul 9, 2020
ac77371
Add a feature flag for the JIT
bjorn3 Jul 9, 2020
1987a3b
Handle SysV64 abi
bjorn3 Jul 9, 2020
037d411
Implement global_asm! using an external assembler
bjorn3 Jul 9, 2020
893497c
Infer the path of toolchain binaries from the linker path
bjorn3 Jul 9, 2020
8cf3818
Disable global_asm! on macOS for now
bjorn3 Jul 9, 2020
548c46f
Merge pull request #1062 from bjorn3/global_asm
bjorn3 Jul 9, 2020
35701d8
Move global_asm into CodegenCx
bjorn3 Jul 9, 2020
726e329
Add basic inline asm support for x86_64
bjorn3 Jul 10, 2020
c73b9d2
Merge pull request #1064 from bjorn3/inline_asm
bjorn3 Jul 10, 2020
190e36a
Make everything in example.rs public
bjorn3 Jul 11, 2020
2ab1084
Add simple profile filter rust script (#1065)
bjorn3 Jul 12, 2020
cc8744c
Set rust-analyzer.linkedProjects for vscode
bjorn3 Jul 12, 2020
d983813
Move RUSTDOCFLAGS to config.sh
bjorn3 Jul 13, 2020
c9d5e7d
Rustup to rustc 1.46.0-nightly (9d09331e0 2020-07-12)
bjorn3 Jul 13, 2020
3dd6548
Update Cranelift
bjorn3 Jul 13, 2020
8dfb1da
Update dependencies
bjorn3 Jul 13, 2020
4ec2831
No silent truncating of SwitchInt values
bjorn3 Jul 13, 2020
a058061
Use `From::from` instead of `as` where possible
bjorn3 Jul 14, 2020
3e67eb1
Update Cranelift
bjorn3 Jul 14, 2020
748d516
Use builtin ranlib instead of running external ranlib
bjorn3 Jul 11, 2020
4a21cff
Remove usage of extern_weak in fast_thread_local
bjorn3 Jul 16, 2020
e87651c
Add test for SwitchInt on 128bit integers
bjorn3 Jun 29, 2020
ccfd1b9
Initialize the atomic mutex in a constructor for proc macros
bjorn3 Jul 16, 2020
942039b
Pass ByRef values at fixed stack offset for extern "C"
bjorn3 Apr 20, 2020
9e76c3e
Merge pull request #1068 from bjorn3/support_proc_macros
bjorn3 Jul 17, 2020
34823a7
Rustup to rustc 1.46.0-nightly (5c9e5df3a 2020-07-16)
bjorn3 Jul 17, 2020
26e7bc1
Update log dependency
bjorn3 Jul 17, 2020
0b211be
Use SystemV abi for extern "sysv64" even on Windows
bjorn3 Jul 19, 2020
edc0a34
Implement simd_insert
bjorn3 Jul 19, 2020
9b9a2e4
Update README.md for #1068
bjorn3 Jul 20, 2020
1ffc307
Rustup to rustc 1.47.0-nightly (bbebe7351 2020-07-22)
bjorn3 Jul 23, 2020
3f2589a
Fix multiple inline asm blocks in the same function
bjorn3 Jul 23, 2020
95511cb
Add unaligned_volatile_{load,store} intrinsics
bjorn3 Jul 23, 2020
1b8df38
Fix -Zpolymorphize
bjorn3 Jul 23, 2020
66343bf
Default cargo.sh to release build of cg_clif
bjorn3 Jul 24, 2020
abc99c6
Allow storing SIMD vectors in SSA values
bjorn3 Mar 27, 2020
08fc673
Handle SIMD vectors in CPlace::place_field
bjorn3 Mar 28, 2020
67028ce
Use PassMode::ByVal for Abi::Vector
bjorn3 Mar 28, 2020
e8f1c5c
Don't forbid i64x2 as simd type
bjorn3 Mar 29, 2020
c1efc33
Fix panic
bjorn3 Jul 25, 2020
e02ffdf
Use nehalem instead of haswell as target cpu
bjorn3 Jul 25, 2020
ce04770
Merge pull request #951 from bjorn3/simd_improvements
bjorn3 Jul 25, 2020
7d69857
Rustup to rustc 1.47.0-nightly (db0492ace 2020-07-29)
bjorn3 Jul 30, 2020
b97a873
Fix test path
bjorn3 Jul 30, 2020
9f635de
Update Cranelift
bjorn3 Jul 30, 2020
c589952
Update dependencies
bjorn3 Jul 30, 2020
50ecea0
Remove cargo home perms workaround
Veetaha Aug 4, 2020
0cdec78
Merge pull request #1069 from Veetaha/feat/remove-perms-workaround
bjorn3 Aug 4, 2020
3e4ddca
Rustup to rustc 1.47.0-nightly (f9d422ea7 2020-08-04)
bjorn3 Aug 5, 2020
da09c57
Update Cranelift
bjorn3 Aug 5, 2020
5afffb8
Update syn
bjorn3 Aug 5, 2020
240e178
Don't panic on io errors
bjorn3 Aug 8, 2020
fb0e5c6
Fix some warnings
bjorn3 Aug 8, 2020
8664ccc
Remove ArchiveConfig
bjorn3 Aug 8, 2020
f79e8e8
Rustup to rustc 1.47.0-nightly (09f4c9f50 2020-08-07)
bjorn3 Aug 8, 2020
49b7fac
Enable simd insert and extract tests
bjorn3 Aug 8, 2020
8c7c091
Rustup to rustc 1.47.0-nightly (ceedf1d5f 2020-08-08)
bjorn3 Aug 9, 2020
847cc7a
Disable the inline asm support using a feature flag
bjorn3 Aug 15, 2020
c1a68b1
Emulate the cpuid arch intrinsic
bjorn3 Aug 15, 2020
3d46a30
Fix ppv-lite86 with simd enabled
bjorn3 Aug 15, 2020
0703e98
Remove cg_clif fake target feature
bjorn3 Aug 15, 2020
d9a24fb
Merge pull request #1070 from bjorn3/cpuid
bjorn3 Aug 15, 2020
4757371
Fix ambiguity between object and cranelift_object::object
bjorn3 Aug 16, 2020
f0069da
Fix panic in when debug assertions are enabled
bjorn3 Aug 16, 2020
7e203ef
Enforce linux style line endings to support WSL (#1073)
craigmayhew Aug 17, 2020
33b6a90
Add workaround for rust-lang/rust#74946
bjorn3 Aug 19, 2020
f4e22f0
[gh actions] Remove actions-rs/cargo step
bjorn3 Aug 19, 2020
03209e1
Don't disable incremental cache for cargo.sh
bjorn3 Aug 19, 2020
50cd72d
Bump actions/cache to v2
bjorn3 Aug 19, 2020
7752718
Update target_feature_whitelist
bjorn3 Aug 19, 2020
ee2addd
Don't test x86_64 simd on archs other than x86_64
bjorn3 Aug 20, 2020
02b7cdc
Update Cranelift and object
bjorn3 Aug 20, 2020
ca9fc10
Fix weak linkage
bjorn3 Aug 16, 2020
a80d642
Merge pull request #1074 from bjorn3/fix_weak_linkage
bjorn3 Aug 20, 2020
e64f523
Evaluate all mir.required_consts and report any errors
bjorn3 Aug 20, 2020
2a14fb7
jit: Add `NULL` as terminating argv
CohenArthur Aug 22, 2020
42c4174
Merge pull request #1075 from CohenArthur/add-null-after-argv
bjorn3 Aug 22, 2020
a1fc2eb
linkage: Change linkage to hidden on non-exported symbols
CohenArthur Aug 22, 2020
5a59c24
FunctionCx: Store reference to CodegenCx instead
CohenArthur Aug 22, 2020
297d65c
FunctionCx: WIP: Replace .tcx with .codegen_cx.tcx
CohenArthur Aug 22, 2020
cb69c70
FunctionCx: Replace .module with .codegen_cx.module
CohenArthur Aug 22, 2020
d199b83
FunctionCx: WIP: Replace .constants with codegen_cx.constants
CohenArthur Aug 22, 2020
ad4a7a1
FunctionCx: WIP: Fix syntax error on sed codegen_cx -> .codegen_cx
CohenArthur Aug 22, 2020
1a6365f
FunctionCx: WIP: Fix overzealous sed usage
CohenArthur Aug 22, 2020
429e75f
FunctionCx: WIP: Remove more common fields from CodegenCx
CohenArthur Aug 22, 2020
4cb2a2b
FunctionCx: Fix field usage in inline_asm and vtable modules
CohenArthur Aug 22, 2020
7b534d6
FunctionCx: Rename codegen_cx -> cx
CohenArthur Aug 22, 2020
ea29b18
FunctionCx: Fix FunctionCx initialization in trans_fn()
CohenArthur Aug 22, 2020
5cf4577
FunctionCx: Add tcx field for easier access
CohenArthur Aug 22, 2020
0d1f8c8
FunctionCx: Refactor `fx.cx.tcx` into `fx.tcx`
CohenArthur Aug 22, 2020
d65e500
FunctionCx: Swap context.func and empty function correctly
CohenArthur Aug 22, 2020
05797b2
trans_fn: Use replace() instead of new() + swap()
CohenArthur Aug 22, 2020
7b99459
trans_fn: Cleanup code
CohenArthur Aug 22, 2020
a4e703a
Merge pull request #1076 from CohenArthur/use-codegencx-in-functioncx
bjorn3 Aug 22, 2020
ec37225
Merge pull request #1077 from CohenArthur/fix-linkage-export-hidden
bjorn3 Aug 22, 2020
18348b1
Rustup to rustc 1.47.0-nightly (663d2f5cd 2020-08-22)
bjorn3 Aug 23, 2020
c62f433
remove_unused_stack_addr_and_stack_load: Remove clone()
CohenArthur Aug 23, 2020
80ee042
stack2reg: Re-add clone() to stop CI
CohenArthur Aug 23, 2020
b0ea85f
stack2reg: Remove self in remove_unused_stack_addr and()
CohenArthur Aug 23, 2020
eb6df58
stack2reg: Remove clone() using filters
CohenArthur Aug 23, 2020
5c8c75b
stack2reg: Drain instead of only iterating
CohenArthur Aug 23, 2020
cb38689
stack2reg: Switch to hashbrown::HashSet
CohenArthur Aug 23, 2020
a9a262a
Merge pull request #1078 from CohenArthur/remove-clone-on-nop-filling
bjorn3 Aug 23, 2020
5dec38e
Avoid temporary stack slot in drop codegen
bjorn3 Aug 25, 2020
4e685a5
fmt: Run cargo fmt since it is available
CohenArthur Aug 28, 2020
9c848e1
fmt: Skip fn_sig_for_fn_abi()
CohenArthur Aug 28, 2020
ed35bc8
fmt: Skip src/target_features_whitelist.rs
CohenArthur Aug 28, 2020
365cebf
optimize: Remove conditional compilation on instance
CohenArthur Aug 28, 2020
fc9f16b
fmt: Skip whole module with bang
CohenArthur Aug 28, 2020
452656b
Merge pull request #1079 from CohenArthur/fmt-master
bjorn3 Aug 28, 2020
a8e3f59
Set notrap flag on loads and stores
bjorn3 Aug 30, 2020
3b0f3a0
Optimize SwitchInt for bools
bjorn3 Aug 30, 2020
bd2313f
Update to hashbrown 0.9
mbrubeck Sep 3, 2020
c9b0d51
Merge pull request #1080 from mbrubeck/deps
bjorn3 Sep 3, 2020
217b381
Rustup to rustc 1.48.0-nightly (c59199efc 2020-09-04)
bjorn3 Sep 5, 2020
4bb25c3
Fix dylib metadata writing
bjorn3 Sep 5, 2020
171e159
Rustup to rustc 1.48.0-nightly (73dc675b9 2020-09-06)
bjorn3 Sep 7, 2020
9c6921b
Fix typo
bjorn3 Sep 14, 2020
50e8f22
Rustup to rustc 1.48.0-nightly (7402a3944 2020-09-13)
bjorn3 Sep 14, 2020
bb59d61
Use don't unroll loop in Rvalue::Repeat
bjorn3 Sep 14, 2020
2d250ff
Fix miscompilation in previous commit
bjorn3 Sep 14, 2020
044470a
Remove hashbrown usage
bjorn3 Sep 15, 2020
7285c13
Reorganize scripts
bjorn3 Sep 16, 2020
55d4afd
Remove byteorder dependency
bjorn3 Sep 16, 2020
b8bbbe3
Remove cfg-if dependency
bjorn3 Sep 16, 2020
51f816f
Rustfmt
bjorn3 Sep 16, 2020
a18a194
Remove wasmparser dependency through object
bjorn3 Sep 16, 2020
552991e
Replace FxHashMap with IndexVec for local_map
bjorn3 Sep 16, 2020
2cd8ccb
Don't benchmark mod_bench anymore
bjorn3 Sep 18, 2020
a2c2db9
Rustup to rustc 1.48.0-nightly (f68e08933 2020-09-19)
bjorn3 Sep 20, 2020
bac3464
Fix debug build
bjorn3 Sep 21, 2020
1add432
Update Cranelift
bjorn3 Sep 21, 2020
cb3101d
Improve rust-analyzer configuration
bjorn3 Sep 22, 2020
e5b2b1b
Misc changes
bjorn3 Sep 22, 2020
829a51c
Shorten __alloc symbol names a bit
bjorn3 Sep 23, 2020
e5437b6
Update Cranelift
bjorn3 Sep 23, 2020
a0f8765
Add option to use a single section for each function
bjorn3 Sep 23, 2020
94f11cc
Use pcrel pointers in .eh_frame
bjorn3 Sep 23, 2020
a12f601
Merge pull request #1083 from bjorn3/fix_lld
bjorn3 Sep 23, 2020
934d56a
Also allow returning PassMode::ByValPair directly into an ssa var
bjorn3 Sep 23, 2020
c869907
Document almost all modules
bjorn3 Sep 23, 2020
8a59808
Improve readme
bjorn3 Sep 23, 2020
d68b50e
Small change to test script
bjorn3 Sep 23, 2020
3ece9fa
Remove dead code
bjorn3 Sep 26, 2020
bcb0862
Enable incr comp for release mode in Cargo.toml
bjorn3 Sep 29, 2020
c0507a6
Invoke panic handler instead of trap for assert_* intrinsics
bjorn3 Sep 29, 2020
a9ec4de
Silence rm warning when files are not existing
bjorn3 Sep 29, 2020
684c054
Rustup to rustc 1.48.0-nightly (fc2daaae6 2020-09-28)
bjorn3 Sep 29, 2020
c046ad0
Fix panic
bjorn3 Sep 29, 2020
17a54ad
Add custom driver
bjorn3 Sep 29, 2020
b8b5a82
Fix JIT
bjorn3 Sep 29, 2020
787d078
Build build scripts for sysroot using cg_llvm
bjorn3 Sep 29, 2020
838dd17
Don't read CG_CLIF_JIT from init_global_lock
bjorn3 Sep 29, 2020
426e557
Replace CG_CLIF_JIT with --jit
bjorn3 Sep 29, 2020
9a513be
Update readme
bjorn3 Sep 29, 2020
0c065f9
Merge pull request #1089 from bjorn3/custom_driver
bjorn3 Sep 29, 2020
3b60cc4
Prevent usage of sccache
bjorn3 Sep 30, 2020
ab92638
Rustup to rustc 1.48.0-nightly (8fe73e80d 2020-10-01)
bjorn3 Oct 2, 2020
3fc673d
Rustup to rustc 1.49.0-nightly (beb5ae474 2020-10-04)
bjorn3 Oct 5, 2020
832b311
Install rustfmt by default when doing a rustup
bjorn3 Oct 5, 2020
cb2dd4b
Update rust-analyzer config for changed path
bjorn3 Oct 5, 2020
1cd63dc
Update sysroot miniz_oxide
bjorn3 Oct 8, 2020
0a5968d
Use the new cranelift-module interface
bjorn3 Oct 1, 2020
e910a24
Merge pull request #1093 from bjorn3/use_new_module_interface
bjorn3 Oct 8, 2020
c352f91
Rustfmt
bjorn3 Oct 9, 2020
faec124
Use custom driver for sysroot building too
bjorn3 Oct 10, 2020
783c677
Rustup to rustc 1.49.0-nightly (b1af43bc6 2020-10-10)
bjorn3 Oct 11, 2020
9683c42
Update Cranelift
bjorn3 Oct 11, 2020
96d76eb
Update dependencies
bjorn3 Oct 11, 2020
6e8ea1c
Abort earlier when an error happens in jit mode
bjorn3 Oct 11, 2020
8ebfc91
Fix rust-analyzer.linkedProjects paths
bjorn3 Oct 11, 2020
e0002c1
Remove MIR dump on panic
bjorn3 Oct 11, 2020
cd2fc77
Make _rust_extern_with_linkage_* readonly
bjorn3 Oct 12, 2020
2f2d3b2
Avoid iadd for ptr const val with zero offset
bjorn3 Oct 12, 2020
6258b86
Rustup to rustc 1.49.0-nightly (c71248b70 2020-10-11)
bjorn3 Oct 12, 2020
a233646
Rustup to rustc 1.49.0-nightly (e160e5cb8 2020-10-14)
bjorn3 Oct 15, 2020
fed612c
Output clif ir to output dir instead of hardcoded path
bjorn3 Oct 15, 2020
1c40840
Fix warning
bjorn3 Oct 15, 2020
7045b10
Use MetadataRef in the metadata loader to fix parallel rustc
bjorn3 Oct 15, 2020
1c272b1
Fix a compilation error in debug mode
bjorn3 Oct 15, 2020
1c7c591
Fix compilation for non-unix systems
bjorn3 Oct 15, 2020
4971028
Rustup to rustc 1.49.0-nightly (dd7fc54eb 2020-10-15)
bjorn3 Oct 16, 2020
0416f12
Error on non-constant simd_insert/simd_extract index
bjorn3 Oct 16, 2020
0409177
Use architecture pointer size for AddConstructor (#1094)
l4l Oct 16, 2020
8dc71a4
Rustup to rustc 1.49.0-nightly (1eaadebb3 2020-10-21)
bjorn3 Oct 22, 2020
d2b8406
Remove unused trap_unimplemented_ret_value
bjorn3 Oct 22, 2020
8ec977e
Replace write with write_all
bjorn3 Oct 25, 2020
793d260
Rustup to rustc 1.49.0-nightly (4760b8fb8 2020-10-25)
bjorn3 Oct 26, 2020
cf798c1
Add support for using cg_clif to bootstrap rustc
bjorn3 Oct 15, 2020
ac4f7de
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23…
bjorn3 Oct 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ members = [
]
exclude = [
"build",
"compiler/rustc_codegen_cranelift",
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
"obj",
]
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_cranelift/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
54 changes: 54 additions & 0 deletions compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
- push
- pull_request

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2

- name: Cache cargo installed crates
uses: actions/cache@v2
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-installed-crates

- name: Cache cargo registry and index
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}

- name: Prepare dependencies
run: |
git config --global user.email "user@example.com"
git config --global user.name "User"
./prepare.sh

- name: Test
run: |
# Enable backtraces for easier debugging
export RUST_BACKTRACE=1

# Reduce amount of benchmark runs as they are slow
export COMPILE_RUNS=2
export RUN_RUNS=2

./test.sh --release
14 changes: 14 additions & 0 deletions compiler/rustc_codegen_cranelift/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
target
**/*.rs.bk
*.rlib
*.o
perf.data
perf.data.old
*.events
*.string*
/build_sysroot/sysroot
/build_sysroot/sysroot_src
/rust
/rand
/regex
/simple-raytracer
53 changes: 53 additions & 0 deletions compiler/rustc_codegen_cranelift/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
// source for rustc_* is not included in the rust-src component; disable the errors about this
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate"],
"rust-analyzer.cargo.loadOutDirsFromCheck": true,
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
//"./build_sysroot/sysroot_src/src/libstd/Cargo.toml",
{
"roots": [
"./example/mini_core.rs",
"./example/mini_core_hello_world.rs",
"./example/mod_bench.rs"
],
"crates": [
{
"root_module": "./example/mini_core.rs",
"edition": "2018",
"deps": [],
"cfg": [],
},
{
"root_module": "./example/mini_core_hello_world.rs",
"edition": "2018",
"deps": [{ "crate": 0, "name": "mini_core" }],
"cfg": [],
},
{
"root_module": "./example/mod_bench.rs",
"edition": "2018",
"deps": [],
"cfg": [],
},
]
},
{
"roots": ["./scripts/filter_profile.rs"],
"crates": [
{
"root_module": "./scripts/filter_profile.rs",
"edition": "2018",
"deps": [{ "crate": 1, "name": "std" }],
"cfg": [],
},
{
"root_module": "./build_sysroot/sysroot_src/library/std/src/lib.rs",
"edition": "2018",
"deps": [],
"cfg": [],
},
]
}
]
}
Loading