Browse Source

build: fix crashpad+asan (#23180)

Jeremy Apthorp 5 years ago
parent
commit
b17cb62287
1 changed files with 6 additions and 0 deletions
  1. 6 0
      BUILD.gn

+ 6 - 0
BUILD.gn

@@ -757,6 +757,12 @@ if (is_mac) {
     outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
 
     public_deps = [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ]
+
+    if (is_asan) {
+      # crashpad_handler requires the ASan runtime at its @executable_path.
+      sources += [ "$root_out_dir/libclang_rt.asan_osx_dynamic.dylib" ]
+      public_deps += [ "//build/config/sanitizers:copy_asan_runtime" ]
+    }
   }
 
   mac_framework_bundle("electron_framework") {