Skip to content

Commit d5809d4

Browse files
Ignore unknown warning flags in bindgen (#4004)
Bindgen uses Clang but allow the selected cc_toolchain isn't Clang. This flag is to ignore non-Clang warning options from the cc_toolchain. Co-authored-by: scentini <rosica@google.com>
1 parent 02be80c commit d5809d4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extensions/bindgen/private/bindgen.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ def _rust_bindgen_impl(ctx):
285285
# Configure Clang Arguments
286286
args.add("--")
287287

288+
# Ignore unknown warning options from the CC toolchain (e.g., GCC-specific flags)
289+
args.add("-Wno-unknown-warning-option")
290+
288291
resource_dir = _get_resource_dir(cc_toolchain)
289292
if resource_dir:
290293
args.add("-resource-dir=%s" % resource_dir)

0 commit comments

Comments
 (0)