We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 793ab6a commit 2fc2e1fCopy full SHA for 2fc2e1f
lldb/test/Shell/helper/toolchain.py
@@ -250,6 +250,15 @@ def use_support_substitutions(config):
250
"-L{}".format(config.libcxx_libs_dir),
251
"-lc++",
252
]
253
+ # By default, macOS doesn't allow injecting the ASAN runtime into system processes.
254
+ if platform.system() in ["Darwin"] and config.llvm_use_sanitizer:
255
+ system_clang = (
256
+ subprocess.check_output(["xcrun", "-find", "clang"]).strip().decode("utf-8")
257
+ )
258
+ system_liblto = os.path.join(
259
+ os.path.dirname(os.path.dirname(system_clang)), "lib", "libLTO.dylib"
260
261
+ host_flags += ["-Wl,-lto_library", "-Wl," + system_liblto]
262
263
host_flags = " ".join(host_flags)
264
config.substitutions.append(("%clang_host", "%clang " + host_flags))
0 commit comments