@@ -658,6 +658,26 @@ class CommandExecutorImpl implements CommandExecutor {
658658 return steps;
659659 }
660660
661+ static final _compilerRT = {
662+ 'ASANX64' : 'libclang_rt.asan-x86_64-android.so' ,
663+ 'HWASANX64' : 'libclang_rt.hwasan-x86_64-android.so' ,
664+ 'TSANX64' : 'libclang_rt.tsan-x86_64-android.so' ,
665+ 'LSANX64' : 'libclang_rt.lsan-x86_64-android.so' ,
666+ 'UBSANX64' : 'libclang_rt.ubsan_standalone-x86_64-android.so' ,
667+
668+ 'ASANARM64' : 'libclang_rt.asan-aarch64-android.so' ,
669+ 'HWASANARM64' : 'libclang_rt.hwasan-aarch64-android.so' ,
670+ 'TSANARM64' : 'libclang_rt.tsan-aarch64-android.so' ,
671+ 'LSANARM64' : 'libclang_rt.lsan-aarch64-android.so' ,
672+ 'UBSANARM64' : 'libclang_rt.ubsan_standalone-aarch64-android.so' ,
673+
674+ 'ASANRISCV64' : 'libclang_rt.asan-riscv64-android.so' ,
675+ 'HWASANRISCV64' : 'libclang_rt.hwasan-riscv64-android.so' ,
676+ 'TSANRISCV64' : 'libclang_rt.tsan-riscv64-android.so' ,
677+ 'LSANRISCV64' : 'libclang_rt.lsan-riscv64-android.so' ,
678+ 'UBSANRISCV64' : 'libclang_rt.ubsan_standalone-riscv64-android.so' ,
679+ };
680+
661681 Future <CommandOutput > _runAdbPrecompilationCommand (
662682 AdbDevice device,
663683 AdbPrecompilationCommand command,
@@ -687,6 +707,16 @@ class CommandExecutorImpl implements CommandExecutor {
687707
688708 steps.add (() => device.runAdbShellCommand (['rm' , '-Rf' , deviceTestDir]));
689709 steps.add (() => device.runAdbShellCommand (['mkdir' , '-p' , deviceTestDir]));
710+ _compilerRT.forEach ((k, v) {
711+ if (buildPath.contains (k)) {
712+ steps.add (
713+ () => device.pushCachedData (
714+ './third_party/android_tools/ndk/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/$v ' ,
715+ '$deviceDir /$v ' ,
716+ ),
717+ );
718+ }
719+ });
690720 steps.add (
691721 () => device.pushCachedData (
692722 '$buildPath /exe.stripped/dartaotruntime' ,
@@ -730,7 +760,7 @@ class CommandExecutorImpl implements CommandExecutor {
730760
731761 steps.add (
732762 () => device.runAdbShellCommand ([
733- 'export LD_LIBRARY_PATH=\$ LD_LIBRARY_PATH:$deviceTestDir ;'
763+ 'export LD_LIBRARY_PATH=\$ LD_LIBRARY_PATH:$deviceTestDir :$ deviceDir ;'
734764 'export TEST_COMPILATION_DIR=$deviceTestDir ;'
735765 '$deviceDir /dartaotruntime' ,
736766 '--android-log-to-stderr' ,
@@ -806,6 +836,16 @@ class CommandExecutorImpl implements CommandExecutor {
806836
807837 steps.add (() => device.runAdbShellCommand (['rm' , '-Rf' , deviceTestDir]));
808838 steps.add (() => device.runAdbShellCommand (['mkdir' , '-p' , deviceTestDir]));
839+ _compilerRT.forEach ((k, v) {
840+ if (buildPath.contains (k)) {
841+ steps.add (
842+ () => device.pushCachedData (
843+ './third_party/android_tools/ndk/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/$v ' ,
844+ '$deviceDir /$v ' ,
845+ ),
846+ );
847+ }
848+ });
809849 steps.add (
810850 () => device.pushCachedData ('$buildPath /dartvm' , '$deviceDir /dartvm' ),
811851 );
@@ -827,7 +867,7 @@ class CommandExecutorImpl implements CommandExecutor {
827867
828868 steps.add (
829869 () => device.runAdbShellCommand ([
830- 'export LD_LIBRARY_PATH=\$ LD_LIBRARY_PATH:$deviceTestDir ;'
870+ 'export LD_LIBRARY_PATH=\$ LD_LIBRARY_PATH:$deviceTestDir :$ deviceDir ;'
831871 '$deviceDir /dartvm' ,
832872 '--android-log-to-stderr' ,
833873 ...arguments,
0 commit comments