We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
clang --driver-mode=cl
clang-cl
1 parent f872c9f commit 6139264Copy full SHA for 6139264
tests/cc_env.rs
@@ -15,6 +15,7 @@ fn main() {
15
extra_flags();
16
path_to_ccache();
17
more_spaces();
18
+ clang_cl();
19
}
20
21
fn ccache() {
@@ -110,3 +111,18 @@ fn more_spaces() {
110
111
let compiler = test.gcc().file("foo.c").get_compiler();
112
assert_eq!(compiler.path(), Path::new("cc"));
113
114
+
115
+fn clang_cl() {
116
+ for exe_suffix in ["", ".exe"] {
117
+ let test = Test::clang();
118
+ let bin = format!("clang{exe_suffix}");
119
+ env::set_var("CC", &format!("{bin} --driver-mode=cl"));
120
+ let test_compiler = |build: cc::Build| {
121
+ let compiler = build.get_compiler();
122
+ assert_eq!(compiler.path(), Path::new(&*bin));
123
+ assert!(compiler.is_like_msvc());
124
+ assert!(compiler.is_like_clang_cl());
125
+ };
126
+ test_compiler(test.gcc());
127
+ }
128
+}
0 commit comments