[ios] [asan] Copy asan runtime dylib when built with "--asan" (flutter/engine#25284)

This commit is contained in:
Kaushik Iska
2021-03-29 15:59:03 -05:00
committed by GitHub
parent ace4d489a0
commit e96ad6e421

View File

@@ -271,6 +271,24 @@ copy("copy_dylib") {
deps = [ ":create_flutter_framework_dylib" ]
}
copy("copy_asan_runtime_dylib") {
visibility = [ ":*" ]
_libclang_base_path =
"//buildtools/mac-x64/clang/lib/clang/13.0.0/lib/darwin/"
if (defined(use_ios_simulator) && use_ios_simulator) {
_dylib_name = "libclang_rt.asan_iossim_dynamic.dylib"
} else {
_dylib_name = "libclang_rt.asan_ios_dynamic.dylib"
}
sources = [ "$_libclang_base_path/$_dylib_name" ]
outputs = [ "$root_out_dir/$_dylib_name" ]
deps = [ ":create_flutter_framework_dylib" ]
}
action("copy_framework_info_plist") {
script = "//flutter/build/copy_info_plist.py"
visibility = [ ":*" ]
@@ -352,6 +370,10 @@ group("universal_flutter_framework") {
":copy_framework_podspec",
":copy_license",
]
if (is_asan) {
deps += [ ":copy_asan_runtime_dylib" ]
}
}
action("flutter_framework") {