Skip to content

Commit 398dab8

Browse files
committed
Suppress warnings for remote Clang targets
This mirrors behavior of remote swift targets which suppress warnings as well.
1 parent 42e86f9 commit 398dab8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/Build/BuildDescription/ClangTargetBuildDescription.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,15 @@ package final class ClangTargetBuildDescription {
323323
args += ["-I", toolchainResourcesPath.pathString]
324324
}
325325

326+
// suppress warnings if the package is remote
327+
if self.package.isRemote {
328+
args += ["-w"]
329+
// `-w` (suppress warnings) and `-Werror` (warnings as errors) flags are mutually exclusive
330+
if let index = args.firstIndex(of: "-Werror") {
331+
args.remove(at: index)
332+
}
333+
}
334+
326335
return args
327336
}
328337

0 commit comments

Comments
 (0)