Skip to content

Commit 9ff1739

Browse files
committed
Suppress warnings for remote Clang targets
This mirrors behavior of remote swift targets which suppress warnings as well.
1 parent 9d48dc7 commit 9ff1739

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/Build/BuildDescription/ClangTargetBuildDescription.swift

+9
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,15 @@ package final class ClangTargetBuildDescription {
305305
args += ["-I", includeSearchPath.pathString]
306306
}
307307

308+
// suppress warnings if the package is remote
309+
if self.package.isRemote {
310+
args += ["-w"]
311+
// `-w` (suppress warnings) and `-Werror` (warnings as errors) flags are mutually exclusive
312+
if let index = args.firstIndex(of: "-Werror") {
313+
args.remove(at: index)
314+
}
315+
}
316+
308317
return args
309318
}
310319

0 commit comments

Comments
 (0)