Added
Link Here
|
0 |
- |
1 |
Don't pass --target when CC/CXX contains clang |
|
|
2 |
|
3 |
diff --git third_party/rust/cc/src/lib.rs third_party/rust/cc/src/lib.rs |
4 |
index 9d133a0..273e520 100644 |
5 |
--- third_party/rust/cc/src/lib.rs |
6 |
+++ third_party/rust/cc/src/lib.rs |
7 |
@@ -2667,24 +2667,7 @@ impl Tool { |
8 |
} |
9 |
|
10 |
fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self { |
11 |
- // Try to detect family of the tool from its name, falling back to Gnu. |
12 |
- let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { |
13 |
- if fname.contains("clang-cl") { |
14 |
- ToolFamily::Msvc { clang_cl: true } |
15 |
- } else if fname.ends_with("cl") || fname == "cl.exe" { |
16 |
- ToolFamily::Msvc { clang_cl: false } |
17 |
- } else if fname.contains("clang") { |
18 |
- match clang_driver { |
19 |
- Some("cl") => ToolFamily::Msvc { clang_cl: true }, |
20 |
- _ => ToolFamily::Clang, |
21 |
- } |
22 |
- } else { |
23 |
- ToolFamily::Gnu |
24 |
- } |
25 |
- } else { |
26 |
- ToolFamily::Gnu |
27 |
- }; |
28 |
- |
29 |
+ let family = ToolFamily::Gnu; |
30 |
Tool { |
31 |
path: path, |
32 |
cc_wrapper_path: None, |