@@ -130,7 +130,7 @@ def _build_libxml2(self, swift_host_triple, has_pthread, wasi_sysroot):
130
130
libxml2 .cmake_options .define ('HAVE_PTHREAD_H' , cmake_thread_enabled )
131
131
132
132
libxml2 .build_with_cmake ([], self .args .build_variant , [],
133
- prefer_native_toolchain = True ,
133
+ prefer_native_toolchain = not self . args . build_runtime_with_host_compiler ,
134
134
ignore_extra_cmake_options = True )
135
135
with shell .pushd (libxml2 .build_dir ):
136
136
shell .call ([self .toolchain .cmake , '--install' , '.' , '--prefix' , '/' , '--component' , 'development' ],
@@ -159,7 +159,7 @@ def _build_foundation(self, swift_host_triple, has_pthread, wasi_sysroot):
159
159
foundation .cmake_options .define ('LIBXML2_LIBRARY' , os .path .join (wasi_sysroot , 'lib' ))
160
160
161
161
foundation .build_with_cmake ([], self .args .build_variant , [],
162
- prefer_native_toolchain = True ,
162
+ prefer_native_toolchain = not self . args . build_runtime_with_host_compiler ,
163
163
ignore_extra_cmake_options = True )
164
164
165
165
dest_dir = self ._target_package_path (swift_host_triple )
@@ -186,7 +186,7 @@ def _build_swift_testing(self, swift_host_triple, has_pthread, wasi_sysroot):
186
186
swift_testing .cmake_options .define ('SwiftTesting_MACRO' , 'NO' )
187
187
188
188
swift_testing .build_with_cmake ([], self .args .build_variant , [],
189
- prefer_native_toolchain = True ,
189
+ prefer_native_toolchain = not self . args . build_runtime_with_host_compiler ,
190
190
ignore_extra_cmake_options = True )
191
191
dest_dir = self ._target_package_path (swift_host_triple )
192
192
with shell .pushd (swift_testing .build_dir ):
@@ -206,7 +206,7 @@ def _build_xctest(self, swift_host_triple, has_pthread, wasi_sysroot):
206
206
xctest .cmake_options .define ('BUILD_SHARED_LIBS' , 'FALSE' )
207
207
208
208
xctest .build_with_cmake ([], self .args .build_variant , [],
209
- prefer_native_toolchain = True ,
209
+ prefer_native_toolchain = not self . args . build_runtime_with_host_compiler ,
210
210
ignore_extra_cmake_options = True )
211
211
dest_dir = self ._target_package_path (swift_host_triple )
212
212
with shell .pushd (xctest .build_dir ):
0 commit comments