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 {
2708
2708
let out_dir = self . get_out_dir ( ) . ok ( ) ;
2709
2709
let out_dir = out_dir. as_deref ( ) ;
2710
2710
2711
- if let Some ( c) = & self . compiler {
2711
+ if let Some ( c) = dbg ! ( & self . compiler) {
2712
2712
return Ok ( Tool :: new (
2713
2713
( * * c) . to_owned ( ) ,
2714
2714
& self . build_cache . cached_compiler_family ,
Original file line number Diff line number Diff line change @@ -110,3 +110,21 @@ fn more_spaces() {
110
110
let compiler = test. gcc ( ) . file ( "foo.c" ) . get_compiler ( ) ;
111
111
assert_eq ! ( compiler. path( ) , Path :: new( "cc" ) ) ;
112
112
}
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