@@ -46,12 +46,30 @@ def copy_file(source_file_path, target_file_path):
46
46
shutil .copy2 (source_file_path , target_file_path )
47
47
print (f"Copied file { source_file_path } to { target_file_path } " )
48
48
49
+ def delete_pdb_files (directory ):
50
+ """
51
+ Delete all .pdb files in the specified directory and its subdirectories.
52
+
53
+ Args:
54
+ - directory: The path to the directory where the search should begin.
55
+ """
56
+ for root , dirs , files in os .walk (directory ):
57
+ for file in files :
58
+ if file .endswith (".pdb" ):
59
+ file_path = os .path .join (root , file )
60
+ os .remove (file_path )
61
+ print (f"Deleted { file_path } " )
62
+
49
63
if __name__ == "__main__" :
50
64
if len (sys .argv ) != 3 :
51
65
print ("Usage: python copy_files.py <source_directory> <target_directory>" )
52
66
else :
53
67
source_directory = sys .argv [1 ]
54
68
target_directory = sys .argv [2 ]
55
69
copy_files_and_dirs (source_directory + "/bin" , target_directory + "/bin" )
70
+ delete_pdb_files (target_directory + "/bin" )
56
71
copy_file (source_directory + "/bin/lld.exe" , target_directory + "/bin/ld.exe" )
72
+ copy_file (source_directory + "/bin/clang.pdb" , target_directory + "/bin/clang.pdb" )
73
+ copy_file (source_directory + "/bin/lld.pdb" , target_directory + "/bin/lld.pdb" )
57
74
copy_files_and_dirs (source_directory + "/lib/clang" , target_directory + "/lib/clang" )
75
+
0 commit comments