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.
1 parent bbae474 commit b344e8eCopy full SHA for b344e8e
src/lib.rs
@@ -1902,7 +1902,14 @@ impl Build {
1902
1903
// Target flags
1904
match cmd.family {
1905
- ToolFamily::Clang { .. } => {
+ ToolFamily::Clang { zig_cc } => {
1906
+ let target = if zig_cc {
1907
+ Cow::Owned(target.replace("-unknown-", "-"))
1908
+ } else {
1909
+ Cow::Borrowed(target)
1910
+ };
1911
+ let target = target.as_ref();
1912
+
1913
if !cmd.has_internal_target_arg
1914
&& !(target.contains("android")
1915
&& android_clang_compiler_uses_target_arg_internally(&cmd.path))
@@ -1998,7 +2005,7 @@ impl Build {
1998
2005
);
1999
2006
}
2000
2007
} else if let Ok(index) = target_info::RISCV_ARCH_MAPPING
2001
- .binary_search_by_key(&arch, |(arch, _)| &arch)
2008
+ .binary_search_by_key(&arch, |(arch, _)| arch)
2002
2009
{
2003
2010
cmd.args.push(
2004
2011
format!(
0 commit comments