55a4e89b3b
Some libraries are layered can depend on other libraries on a private paths. That is, libA can depend on libB which is neither on the LD_LIBRARY_PATH nor on a known system path. The posix linker injects "variables" such as @rpath which is expanded at link time to resolve the libraries on a relative path. Prior to this patch, cling's Dyld-based symbol resolution could not trace down such cases causing failures in symbol resolution when a symbol is only defined in libB (a private library). This patch implements the basic posix linker substitutions allowing cling's Dyld-based symbol resolution implementation to follow more closely the linker rules. Kudos Alexander Penev (@alexander-penev).
20 lines
652 B
C
20 lines
652 B
C
//------------------------------------------------------------------------------
|
|
// CLING - the C++ LLVM-based InterpreterG :)
|
|
//
|
|
// This file is dual-licensed: you can choose to license it under the University
|
|
// of Illinois Open Source License or the GNU Lesser General Public License. See
|
|
// LICENSE.TXT for details.
|
|
//------------------------------------------------------------------------------
|
|
|
|
// REQUIRES: shell
|
|
// RUN: env -i LD_LIBRARY_PATH="../:./../" %cling ".L" 2>&1 | FileCheck %s
|
|
|
|
// Test: Cling must use (DY)LD_LIBRARY_PATH as path for search libraries.
|
|
|
|
// CHECK: ../
|
|
// CHECK-NEXT: ./../
|
|
// CHECK-NEXT: .
|
|
// CHECK-NEXT: [system]
|
|
|
|
.q
|