@@ -142,10 +142,13 @@ def copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain(
142
142
if not os .path .isfile (dest_lib_path ):
143
143
if os .path .isfile (host_lib_path ):
144
144
if _os == 'tvos' :
145
+ print ('{} -> {} (stripping i386)' .format (
146
+ host_lib_path , dest_lib_path ))
145
147
self .copy_lib_stripping_architecture (host_lib_path ,
146
148
dest_lib_path ,
147
149
'i386' )
148
150
else :
151
+ print ('{} -> {}' .format (host_lib_path , dest_lib_path ))
149
152
shutil .copy (host_lib_path , dest_lib_path )
150
153
elif self .args .verbose_build :
151
154
print ('no file exists at {}' .format (host_lib_path ))
@@ -161,9 +164,13 @@ def copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain(
161
164
if _os == 'tvos' :
162
165
# This is to avoid strip failures when generating
163
166
# a toolchain
167
+ print ('{} -> {} (stripping i386)' .format (
168
+ host_sim_lib_path , dest_sim_lib_path ))
164
169
self .copy_lib_stripping_architecture (
165
170
host_sim_lib_path , dest_sim_lib_path , 'i386' )
166
171
else :
172
+ print ('{} -> {}' .format (
173
+ host_sim_lib_path , dest_sim_lib_path ))
167
174
shutil .copy (host_sim_lib_path , dest_sim_lib_path )
168
175
169
176
elif os .path .isfile (host_lib_path ):
@@ -181,6 +188,8 @@ def copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain(
181
188
shell .call (['lipo' , '-remove' , 'i386' , host_lib_path ,
182
189
'-output' , dest_sim_lib_path ])
183
190
else :
191
+ print ('{} -> {}' .format (host_lib_path ,
192
+ dest_sim_lib_path ))
184
193
shutil .copy (host_lib_path , dest_sim_lib_path )
185
194
elif self .args .verbose_build :
186
195
print ('no file exists at {}' , host_sim_lib_path )
@@ -195,6 +204,7 @@ def copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain(
195
204
dest_lib_path = os .path .join (dest_builtins_dir , lib_name )
196
205
if not os .path .isfile (dest_lib_path ):
197
206
if os .path .isfile (host_lib_path ):
207
+ print ('{} -> {}' .format (host_lib_path , dest_lib_path ))
198
208
shutil .copy (host_lib_path , dest_lib_path )
199
209
elif self .args .verbose_build :
200
210
print ('no file exists at {}' .format (host_lib_path ))
@@ -286,6 +296,12 @@ def build(self, host_target):
286
296
llvm_cmake_options .define ('LLVM_ENABLE_LTO:STRING' , self .args .lto_type )
287
297
llvm_cmake_options .define ('COMPILER_RT_INTERCEPT_LIBDISPATCH' , 'ON' )
288
298
299
+ if system () == 'Darwin' :
300
+ # Ask for Mach-O cross-compilation builtins (for Embedded Swift)
301
+ llvm_cmake_options .define (
302
+ 'COMPILER_RT_FORCE_BUILD_BAREMETAL_MACHO_BUILTINS_ARCHS:STRING' ,
303
+ 'armv6 armv6m armv7 armv7m armv7em' )
304
+
289
305
llvm_enable_projects = ['clang' ]
290
306
291
307
if self .args .build_compiler_rt and \
0 commit comments