Skip to content

Commit 87d07e6

Browse files
committed
[lldb] work around a liner error on the asan bot
1 parent f092dfb commit 87d07e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zorg/jenkins/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,12 @@ def lldb_cmake_builder(target, variant=None):
569569

570570
if variant == 'sanitized':
571571
cmake_cmd.append('-DLLVM_USE_SANITIZER=Address;Undefined')
572+
# By default macOS prevents an asanified dylib to be loaded into the system linker.
573+
liblto = (
574+
os.path.dirname(run_collect_output(["xcrun", "--find", "clang"]).strip())
575+
+ "../lib/libLTO.dylib"
576+
)
577+
cmake_cmd.append("-DLIBCXXABI_LINK_FLAGS=-Wl,-lto_library -Wl" + liblto)
572578
# There is no need to compile the lldb tests with an asanified compiler
573579
# if we have a host compiler available.
574580
if conf.CC():

0 commit comments

Comments
 (0)