Skip to content

Commit

Permalink
[LLVM] Set StackProtectorGuard mode to Global
Browse files Browse the repository at this point in the history
x-ref: https://reviews.llvm.org/D88631

Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
  • Loading branch information
vchuravy and tkf committed May 20, 2021
1 parent 7df16be commit 8ae50e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7930,6 +7930,10 @@ extern "C" void jl_init_llvm(void)
// and to ensure that it is 16-byte aligned for out-going calls,
// to ensure compatibility with GCC codes
options.StackAlignmentOverride = 16;
#endif
#ifdef JL_DEBUG_BUILD
// LLVM defaults to tls stack guard, which causes issues with Julia's tls implementation
options.StackProtectorGuard = StackProtectorGuards::Global;
#endif
Triple TheTriple(sys::getProcessTriple());
#if defined(FORCE_ELF)
Expand Down

0 comments on commit 8ae50e0

Please sign in to comment.