@@ -130,7 +130,7 @@ def _build_libxml2(self, swift_host_triple, has_pthread, wasi_sysroot):
130130 libxml2 .cmake_options .define ('HAVE_PTHREAD_H' , cmake_thread_enabled )
131131
132132 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 ,
134134 ignore_extra_cmake_options = True )
135135 with shell .pushd (libxml2 .build_dir ):
136136 shell .call ([self .toolchain .cmake , '--install' , '.' , '--prefix' , '/' , '--component' , 'development' ],
@@ -159,7 +159,7 @@ def _build_foundation(self, swift_host_triple, has_pthread, wasi_sysroot):
159159 foundation .cmake_options .define ('LIBXML2_LIBRARY' , os .path .join (wasi_sysroot , 'lib' ))
160160
161161 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 ,
163163 ignore_extra_cmake_options = True )
164164
165165 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):
186186 swift_testing .cmake_options .define ('SwiftTesting_MACRO' , 'NO' )
187187
188188 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 ,
190190 ignore_extra_cmake_options = True )
191191 dest_dir = self ._target_package_path (swift_host_triple )
192192 with shell .pushd (swift_testing .build_dir ):
@@ -206,7 +206,7 @@ def _build_xctest(self, swift_host_triple, has_pthread, wasi_sysroot):
206206 xctest .cmake_options .define ('BUILD_SHARED_LIBS' , 'FALSE' )
207207
208208 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 ,
210210 ignore_extra_cmake_options = True )
211211 dest_dir = self ._target_package_path (swift_host_triple )
212212 with shell .pushd (xctest .build_dir ):
0 commit comments