David Tolnay
3f92261579
Generate better function argument names in global_allocator expansion
2023-08-06 07:36:05 -07:00
bjorn3
81ea0b29ea
Merge commit '8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807' into sync_cg_clif-2023-06-15
2023-06-15 17:56:01 +00:00
bjorn3
2253e866a9
Prevent insta-stable no alloc shim support
...
You will need to add the following as replacement for the old __rust_*
definitions when not using the alloc shim.
#[no_mangle]
static __rust_no_alloc_shim_is_unstable: u8 = 0;
2023-05-11 14:35:09 +00:00
bjorn3
a1d0a902c3
Use global_fn_name instead of format!
2023-05-11 14:35:09 +00:00
bjorn3
5930509272
Split AllocatorKind::fn_name in global_fn_name and default_fn_name
2023-05-11 14:35:08 +00:00
bjorn3
002aa8ed90
Don't use an allocator shim for #[global_allocator]
...
This makes it possible to use liballoc/libstd in combination with
`--emit obj` if you use `#[global_allocator]`. Making it work for the
default libstd allocator would require weak functions, which are not
well supported on all systems.
2023-05-11 14:23:31 +00:00
Collin Baker
f2c81bb1c0
Don't export of __rust_* alloc symbols if not codegened
2023-03-09 19:21:44 -05:00
bjorn3
56951e4f2b
Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09
2023-02-09 12:38:16 +01:00
bjorn3
98a276b589
Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14
2022-12-14 19:30:46 +01:00
Amanieu d'Antras
b166ad0b1e
Rewrite implementation of #[alloc_error_handler]
...
The new implementation doesn't use weak lang items and instead changes
`#[alloc_error_handler]` to an attribute macro just like
`#[global_allocator]`.
The attribute will generate the `__rg_oom` function which is called by
the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom`
function is defined in any crate then the compiler shim will call
`__rdl_oom` in the alloc crate which will simply panic.
This also fixes link errors with `-C link-dead-code` with
`default_alloc_error_handler`: `__rg_oom` was previously defined in the
alloc crate and would attempt to reference the `oom` lang item, even if
it didn't exist. This worked as long as `__rg_oom` was excluded from
linking since it was not called.
This is a prerequisite for the stabilization of
`default_alloc_error_handler` (#102318 ).
2022-10-31 16:32:57 +00:00
bjorn3
9950bd1dc5
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
2022-10-23 16:22:55 +02:00
Joshua Nelson
b2ae24e6a1
Rename debugging_opts
to unstable_opts
...
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
2022-07-13 17:47:06 -05:00
Amanieu d'Antras
e29149552e
Add -Z oom={panic,abort} command-line option
2022-03-03 12:58:38 +00:00
bjorn3
b5cbb87e62
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
2022-02-23 11:49:34 +01:00
bjorn3
d220159810
Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06
2021-08-06 16:26:56 +02:00
Camille GILLOT
b497c7d954
Make allocator_kind a query.
2021-06-20 11:52:51 +02:00
Camille Gillot
d8d6a5aee0
Revert "Reduce the amount of untracked state in TyCtxt"
2021-06-01 09:05:22 +02:00
Camille GILLOT
4e62376059
Make allocator_kind a query.
2021-05-30 19:58:01 +02:00
Camille GILLOT
f22ab98d4c
Use () in dependency_formats.
2021-05-12 13:58:41 +02:00
Erin Power
ee570b1302
Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'
2021-04-30 14:49:58 +02:00
bjorn3
07968a001d
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
2021-03-29 10:45:09 +02:00
bjorn3
27886cd6b6
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
2021-03-05 19:12:59 +01:00
bjorn3
285c7c66dc
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01
2020-11-03 11:00:04 +01: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
3fc673d0a9
Rustup to rustc 1.49.0-nightly ( beb5ae474
2020-10-04)
2020-10-05 11:12:41 +02:00
bjorn3
c8699076f9
Document almost all modules
...
Fixes #1082
2020-09-23 15:13:49 +02:00
CohenArthur
4e685a512e
fmt: Run cargo fmt since it is available
2020-08-28 12:10:48 +02:00
bjorn3
ba7cdf21be
Emit unwind info for main and alloc shim
...
Fixes #988
2020-06-12 19:31:35 +02:00
bjorn3
13e3a3c8b0
Rustup to rustc 1.44.0-nightly ( 211365947
2020-03-30)
2020-03-31 13:20:19 +02:00
bjorn3
f6d12440aa
Update Cranelift
2020-03-28 14:01:48 +01:00
bjorn3
f288959c00
Limit publicness to crate where possible and remove unused imports
2020-03-27 12:14:45 +01:00
bjorn3
9ab2af56aa
Rustup to rustc 1.43.0-nightly ( 4ad624882
2020-03-03)
2020-03-04 15:04:28 +01:00
bjorn3
430f738392
Update Cranelift for basic blocks
2020-02-14 18:23:29 +01:00
bjorn3
09b44f5d25
Reduce visibility
2020-01-14 17:11:06 +01:00
bjorn3
79ec8948d8
Fix some warnings
2019-12-18 20:26:41 +01:00
bjorn3
d502f8e652
[OPT] Avoid calling target_triple for every call to codegen
2019-12-17 16:34:48 +01:00
bjorn3
177b0d2f57
Rustup to rustc 1.41.0-nightly ( ded5ee001
2019-11-13)
2019-11-14 21:13:40 +01:00
bjorn3
0cad01f239
Rustup to rustc 1.40.0-nightly ( aa4e57ca8
2019-10-31)
2019-11-01 20:22:59 +01:00
bjorn3
8243a370d2
Rustup to rustc 1.40.0-nightly ( fa0f7d008
2019-10-17)
2019-10-18 18:31:26 +02:00
bjorn3
58a9b648e8
Update cranelift, faerie and target-lexicon
2019-10-03 18:55:01 +02:00
bjorn3
0db605040e
Use CallConv::triple_default instead of hard coding SystemV
...
Fixes #718
2019-09-28 17:00:27 +02:00
bjorn3
44792f1089
Rustup to rustc 1.40.0-nightly ( 084beb83e
2019-09-27)
2019-09-28 14:06:12 +02:00
bjorn3
ce0be229d7
Use upstream cranelift
2019-09-08 19:18:17 +02:00
bjorn3
fe20f8cba6
Rustup to rustc 1.38.0-nightly ( c43753f91
2019-07-26)
2019-07-27 11:35:46 +02:00
bjorn3
f02490d960
Rustfmt
2019-02-21 15:06:09 +01:00
bjorn3
c8d435aade
Put allocator shim in a different object file
2018-12-13 15:24:14 +01:00
bjorn3
4d0dba944c
Some refactorings for codegen_mono_items
2018-12-12 16:01:34 +01:00
bjorn3
dc2f32f985
Change the CallConv for "rust" abi functions to "SystemV" to match the "C" abi
...
The allocator machinery seems to mix "rust" and "C" abi function defs and calls.
2018-12-11 15:13:45 +01:00
bjorn3
06202c007c
Fix some 2018 edition idioms
2018-11-17 18:23:52 +01:00
bjorn3
1717cc42ef
Fix allocator shim abi
2018-11-14 15:04:50 +01:00