Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6a679ff
bypass auto_da_alloc for metadata files
the8472 Feb 12, 2021
6e52b23
Fix jemalloc usage on OSX
sfackler Feb 28, 2021
920e2d8
Add natvis for Result, NonNull, CString, CStr, and Cow
rylev Feb 26, 2021
c8a0e8d
Refactor confirm_builtin_call, remove partial if
osa1 Mar 4, 2021
bc18eb4
expand: Remove obsolete `DirectoryOwnership::UnownedViaMod`
petrochenkov Feb 22, 2021
39052c5
expand: Move module file path stack from global session to expansion …
petrochenkov Feb 21, 2021
5bdf81d
expand: Determine module directory path directly instead of relying o…
petrochenkov Feb 22, 2021
3d0b622
expand: Less path cloning during module loading
petrochenkov Feb 22, 2021
46b67aa
expand: Some more consistent naming in module loading
petrochenkov Feb 22, 2021
da3419e
rustc_interface: Hide some hacky details of early linting from expand
petrochenkov Feb 22, 2021
29a9ef2
expand: Align some code with the PR fixing inner attributes on out-of…
petrochenkov Feb 22, 2021
1e1d574
expand: Share some code between inline and out-of-line module treatment
petrochenkov Feb 22, 2021
1fe2eb8
expand: Introduce enum for module loading errors and make module load…
petrochenkov Feb 22, 2021
1b4860a
Update compiler/rustc/src/main.rs
sfackler Mar 5, 2021
6f49aad
Disable destination propagation on all mir-opt-levels
tmiasko Mar 6, 2021
069e612
rustc_ast: Replace `AstLike::finalize_tokens` with a getter `tokens_mut`
petrochenkov Mar 6, 2021
5dad6c2
Implement built-in attribute macro `#[cfg_eval]`
petrochenkov Mar 6, 2021
cf52469
Remove Item::kind, use tagged enum. Rename variants to match
CraftSpider Feb 28, 2021
ca48d15
Add roundtrip testing and bump format version
CraftSpider Mar 4, 2021
83cece4
Move tests to own file
CraftSpider Mar 5, 2021
70c9b37
x.py fmt
CraftSpider Mar 5, 2021
18841ec
Revert fmt version, add rustdoc-json-types to bootstrap tests
CraftSpider Mar 6, 2021
f9019b7
Move full configuration logic from `rustc_expand` to `rustc_builtin_m…
petrochenkov Mar 6, 2021
10ed08f
cfg_eval: Configure everything through mutable visitor methods
petrochenkov Mar 6, 2021
5d27728
rustc_builtin_macros: Share some more logic between `derive` and `cfg…
petrochenkov Mar 6, 2021
6b2eb0e
Edit ructc_ast_lowering docs
pierwill Mar 7, 2021
ab8995b
Generalize Write impl for Vec<u8> to Vec<u8, A>
athre0z Mar 7, 2021
f311750
Rollup merge of #82047 - the8472:fast-rename, r=davidtwco
Dylan-DPC Mar 8, 2021
08a133f
Rollup merge of #82415 - petrochenkov:modin3, r=davidtwco
Dylan-DPC Mar 8, 2021
85a0eb5
Rollup merge of #82557 - rylev:natvis-improvements, r=varkor
Dylan-DPC Mar 8, 2021
a0b7280
Rollup merge of #82613 - CraftSpider:fix-de, r=aDotInTheVoid
Dylan-DPC Mar 8, 2021
d153d8c
Rollup merge of #82642 - sfackler:jemalloc-zone, r=pnkfelix
Dylan-DPC Mar 8, 2021
0006ea2
Rollup merge of #82682 - petrochenkov:cfgeval, r=Aaron1011
Dylan-DPC Mar 8, 2021
a5871e6
Rollup merge of #82684 - tmiasko:dest-prop, r=jonas-schievink
Dylan-DPC Mar 8, 2021
d8ad825
Rollup merge of #82755 - osa1:confirm_builtin_call_refactor, r=petroc…
Dylan-DPC Mar 8, 2021
b6d13b4
Rollup merge of #82857 - pierwill:edit-ast-lowering-lib, r=Dylan-DPC
Dylan-DPC Mar 8, 2021
c0466fa
Rollup merge of #82862 - athre0z:generalize-vec-write-impl, r=TimDiek…
Dylan-DPC Mar 8, 2021
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
Prev Previous commit
Next Next commit
Fix jemalloc usage on OSX
Closes #82423
  • Loading branch information
sfackler committed Feb 28, 2021
commit 6e52b23fa94ed967daed38cb3796d0874ec705a7
14 changes: 14 additions & 0 deletions compiler/rustc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ fn main() {
static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = jemalloc_sys::realloc;
#[used]
static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free;

// On OSX, jemalloc doesn't directly override malloc/free, but instead
// registers itself with the allocator's zone APIs in a ctor. However,
// the linker doesn't seem to consider ctors as "used" when statically
// linking, so we need to explicitly depend on the function.
#[cfg(target_os = "macos")]
{
extern "C" {
fn _rjem_je_zone_register();
}

#[used]
static _F7: unsafe extern "C" fn() = _rjem_je_zone_register();
}
}

rustc_driver::set_sigpipe_handler();
Expand Down