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 540250c commit 20e1a12Copy full SHA for 20e1a12
lldb/test/Shell/helper/build.py
@@ -804,7 +804,19 @@ def _get_link_command(self):
804
args.extend(self._obj_file_names())
805
806
if sys.platform == "darwin":
807
+ # By default, macOS doesn't allow injecting the ASAN
808
+ # runtime into system processes.
809
+ system_clang = (
810
+ subprocess.check_output(["xcrun", "-find", "clang"])
811
+ .strip()
812
+ .decode("utf-8")
813
+ )
814
+ system_liblto = os.path.join(
815
+ os.path.dirname(os.path.dirname(system_clang)), "lib", "libLTO.dylib"
816
817
args.extend(["-isysroot", self.apple_sdk])
818
+ args.extend(["-Wl,-lto_library", "-Wl," + system_liblto])
819
+
820
elif self.objc_gnustep_lib:
821
args.extend(["-L", self.objc_gnustep_lib, "-lobjc"])
822
if sys.platform == "linux":
0 commit comments