@@ -283,7 +283,7 @@ impl Step for Llvm {
283283} ;
284284
285285 builder. update_submodule ( & Path :: new ( "src" ) . join ( "llvm-project" ) ) ;
286- if builder. llvm_link_shared ( ) && target. contains ( "windows" ) {
286+ if builder. llvm_link_shared ( ) && target. is_windows ( ) {
287287panic ! ( "shared linking to LLVM is not currently supported on {}" , target. triple) ;
288288}
289289
@@ -361,7 +361,7 @@ impl Step for Llvm {
361361// Disable zstd to avoid a dependency on libzstd.so.
362362 cfg. define ( "LLVM_ENABLE_ZSTD" , "OFF" ) ;
363363
364- if !target. contains ( "windows" ) {
364+ if !target. is_windows ( ) {
365365 cfg. define ( "LLVM_ENABLE_ZLIB" , "ON" ) ;
366366} else {
367367 cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
@@ -607,7 +607,7 @@ fn configure_cmake(
607607 cfg. define ( "CMAKE_SYSTEM_NAME" , "DragonFly" ) ;
608608} else if target. contains ( "freebsd" ) {
609609 cfg. define ( "CMAKE_SYSTEM_NAME" , "FreeBSD" ) ;
610- } else if target. contains ( "windows" ) {
610+ } else if target. is_windows ( ) {
611611 cfg. define ( "CMAKE_SYSTEM_NAME" , "Windows" ) ;
612612} else if target. contains ( "haiku" ) {
613613 cfg. define ( "CMAKE_SYSTEM_NAME" , "Haiku" ) ;
@@ -772,7 +772,7 @@ fn configure_cmake(
772772 && !target. contains ( "netbsd" )
773773 && !target. contains ( "solaris" )
774774{
775- if target. contains ( "apple" ) || target. contains ( "windows" ) {
775+ if target. contains ( "apple" ) || target. is_windows ( ) {
776776 ldflags. push_all ( "-static-libstdc++" ) ;
777777} else {
778778 ldflags. push_all ( "-Wl,-Bsymbolic -static-libstdc++" ) ;
@@ -1295,7 +1295,7 @@ impl Step for Libunwind {
12951295 cfg. define ( "__LIBUNWIND_IS_NATIVE_ONLY" , None ) ;
12961296 cfg. define ( "NDEBUG" , None ) ;
12971297}
1298- if self . target . contains ( "windows" ) {
1298+ if self . target . is_windows ( ) {
12991299 cfg. define ( "_LIBUNWIND_HIDE_SYMBOLS" , "1" ) ;
13001300 cfg. define ( "_LIBUNWIND_IS_NATIVE_ONLY" , "1" ) ;
13011301}
0 commit comments