diff --git a/src/lib.rs b/src/lib.rs index 219d82cd7..d91545d41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -522,6 +522,11 @@ impl Build { if compiler.family.verbose_stderr() { compiler.remove_arg("-v".into()); } + if compiler.family == ToolFamily::Clang { + // Avoid reporting that the arg is unsupported just because the + // compiler complains that it wasn't used. + compiler.push_cc_arg("-Wno-unused-command-line-argument".into()); + } let mut cmd = compiler.to_command(); let is_arm = target.contains("aarch64") || target.contains("arm");