Skip to content

Commit 2f6b1b4

Browse files
authored
[ORC] Add default visibility to required JIT functions (#86322)
If you build LLVM with `-DCMAKE_CXX_VISIBILITY_PRESET=hidden` to help reduce binary size, these symbols end up becoming local, and getting stripped. This forces default visibility to override the global setting in that case. Relevant: #62815 (comment)
1 parent b723c57 commit 2f6b1b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ extern "C" {
2626
// We put information about the JITed function in this global, which the
2727
// debugger reads. Make sure to specify the version statically, because the
2828
// debugger checks the version before we can set it during runtime.
29+
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
2930
struct jit_descriptor __jit_debug_descriptor = {JitDescriptorVersion, 0,
3031
nullptr, nullptr};
3132

3233
// Debuggers that implement the GDB JIT interface put a special breakpoint in
3334
// this function.
35+
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
3436
LLVM_ATTRIBUTE_NOINLINE void __jit_debug_register_code() {
3537
// The noinline and the asm prevent calls to this function from being
3638
// optimized out.

0 commit comments

Comments
 (0)