File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2708,7 +2708,7 @@ impl Build {
27082708 let out_dir = self . get_out_dir ( ) . ok ( ) ;
27092709 let out_dir = out_dir. as_deref ( ) ;
27102710
2711- if let Some ( c) = & self . compiler {
2711+ if let Some ( c) = dbg ! ( & self . compiler) {
27122712 return Ok ( Tool :: new (
27132713 ( * * c) . to_owned ( ) ,
27142714 & self . build_cache . cached_compiler_family ,
Original file line number Diff line number Diff line change @@ -110,3 +110,21 @@ fn more_spaces() {
110110 let compiler = test. gcc ( ) . file ( "foo.c" ) . get_compiler ( ) ;
111111 assert_eq ! ( compiler. path( ) , Path :: new( "cc" ) ) ;
112112}
113+
114+ fn clang_cl ( ) {
115+ let test = |cc| {
116+ let test = Test :: clang ( ) ;
117+ env:: set_var ( "CC" , cc) ;
118+ let test_compiler = |build : cc:: Build | {
119+ let compiler = build. get_compiler ( ) ;
120+ assert_eq ! ( compiler. path( ) , Path :: new( "clang" ) ) ;
121+ // assert_eq!(compiler.args(), vec!["--driver-mode=cl"]);
122+ assert ! ( compiler. is_like_msvc( ) ) ;
123+ assert ! ( compiler. is_like_clang_cl( ) ) ;
124+ } ;
125+ test_compiler ( test. gcc ( ) ) ;
126+ } ;
127+
128+ test ( "clang --driver-mode=cl" ) ;
129+ // test("clang.exe --driver-mode=cl");
130+ }
You can’t perform that action at this time.
0 commit comments