@@ -98,7 +98,7 @@ pub fn prebuilt_llvm_config(
9898 let out_dir = builder. llvm_out ( target) ;
9999
100100 let mut llvm_config_ret_dir = builder. llvm_out ( builder. config . build ) ;
101- if !builder. config . build . contains ( "msvc" ) || builder. ninja ( ) {
101+ if !builder. config . build . is_msvc ( ) || builder. ninja ( ) {
102102 llvm_config_ret_dir. push ( "build" ) ;
103103 }
104104 llvm_config_ret_dir. push ( "bin" ) ;
@@ -411,7 +411,7 @@ impl Step for Llvm {
411411 ldflags. shared . push ( " -latomic" ) ;
412412 }
413413
414- if target. contains ( "msvc" ) {
414+ if target. is_msvc ( ) {
415415 cfg. define ( "LLVM_USE_CRT_DEBUG" , "MT" ) ;
416416 cfg. define ( "LLVM_USE_CRT_RELEASE" , "MT" ) ;
417417 cfg. define ( "LLVM_USE_CRT_RELWITHDEBINFO" , "MT" ) ;
@@ -644,7 +644,7 @@ fn configure_cmake(
644644 }
645645
646646 let sanitize_cc = |cc : & Path | {
647- if target. contains ( "msvc" ) {
647+ if target. is_msvc ( ) {
648648 OsString :: from ( cc. to_str ( ) . unwrap ( ) . replace ( "\\ " , "/" ) )
649649 } else {
650650 cc. as_os_str ( ) . to_owned ( )
@@ -654,7 +654,7 @@ fn configure_cmake(
654654 // MSVC with CMake uses msbuild by default which doesn't respect these
655655 // vars that we'd otherwise configure. In that case we just skip this
656656 // entirely.
657- if target. contains ( "msvc" ) && !builder. ninja ( ) {
657+ if target. is_msvc ( ) && !builder. ninja ( ) {
658658 return ;
659659 }
660660
@@ -664,7 +664,7 @@ fn configure_cmake(
664664 } ;
665665
666666 // Handle msvc + ninja + ccache specially (this is what the bots use)
667- if target. contains ( "msvc" ) && builder. ninja ( ) && builder. config . ccache . is_some ( ) {
667+ if target. is_msvc ( ) && builder. ninja ( ) && builder. config . ccache . is_some ( ) {
668668 let mut wrap_cc = env:: current_exe ( ) . expect ( "failed to get cwd" ) ;
669669 wrap_cc. set_file_name ( "sccache-plus-cl.exe" ) ;
670670
@@ -768,7 +768,7 @@ fn configure_cmake(
768768 // For distribution we want the LLVM tools to be *statically* linked to libstdc++.
769769 // We also do this if the user explicitly requested static libstdc++.
770770 if builder. config . llvm_static_stdcpp
771- && !target. contains ( "msvc" )
771+ && !target. is_msvc ( )
772772 && !target. contains ( "netbsd" )
773773 && !target. contains ( "solaris" )
774774 {
@@ -874,7 +874,7 @@ impl Step for Lld {
874874 // when doing PGO on CI, cmake or clang-cl don't automatically link clang's
875875 // profiler runtime in. In that case, we need to manually ask cmake to do it, to avoid
876876 // linking errors, much like LLVM's cmake setup does in that situation.
877- if builder. config . llvm_profile_generate && target. contains ( "msvc" ) {
877+ if builder. config . llvm_profile_generate && target. is_msvc ( ) {
878878 if let Some ( clang_cl_path) = builder. config . llvm_clang_cl . as_ref ( ) {
879879 // Find clang's runtime library directory and push that as a search path to the
880880 // cmake linker flags.
0 commit comments