@@ -95,21 +95,33 @@ def lipo(
95
95
packages : rutils .PackageList ,
96
96
):
97
97
archs = GLOBAL_CONFIG [target_os ]["archs" ]
98
+ universal_binary_dist_path = get_universal_library_distribution_directory (
99
+ project , target_os , debug
100
+ )
98
101
99
102
for _ , bins in packages .items ():
100
103
for _ , binary in bins .items ():
101
104
create_fat_binary (
102
105
project ,
103
- get_universal_library_distribution_directory (project , target_os , debug )
104
- / binary ,
106
+ universal_binary_dist_path / binary ,
105
107
target_os ,
106
108
archs .keys (),
107
109
binary ,
108
110
debug ,
109
111
)
110
112
111
113
for arch in archs :
112
- shutil .rmtree (project .get_distribution_path (target_os , arch , "" , debug ))
114
+ dist_path = project .get_distribution_path (target_os , arch , "" , debug )
115
+
116
+ for _ , bins in packages .items ():
117
+ for _ , binary in bins .items ():
118
+ dsym_dir = f"{ dist_path } /{ binary } .dSYM"
119
+ if os .path .isdir (dsym_dir ):
120
+ dst_dir = f"{ universal_binary_dist_path } /{ binary } .dSYM/{ arch } "
121
+ os .makedirs (dst_dir , exist_ok = True )
122
+ shutil .copytree (dsym_dir , dst_dir , dirs_exist_ok = True )
123
+
124
+ shutil .rmtree (dist_path )
113
125
114
126
115
127
def create_fat_binary (
0 commit comments