From 665ac5b425cea2462bf85dcbb56dd68ec19ad00f Mon Sep 17 00:00:00 2001 From: Oleg Fatkhiev <41271510+ofats@users.noreply.github.com> Date: Wed, 1 Sep 2021 21:48:37 +0100 Subject: Add -Wno-unknown-warning-option to ABSL_LLVM_FLAGS to disable warnings on unknown warning flags. (#1008) --- absl/copts/GENERATED_AbseilCopts.cmake | 1 + absl/copts/GENERATED_copts.bzl | 1 + absl/copts/copts.py | 3 +++ 3 files changed, 5 insertions(+) diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake index 22a25eba..a4ab1aa2 100644 --- a/absl/copts/GENERATED_AbseilCopts.cmake +++ b/absl/copts/GENERATED_AbseilCopts.cmake @@ -94,6 +94,7 @@ list(APPEND ABSL_LLVM_FLAGS "-Wno-implicit-int-conversion" "-Wno-shorten-64-to-32" "-Wno-sign-conversion" + "-Wno-unknown-warning-option" "-DNOMINMAX" ) diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl index 0c7a91bd..a6efc98e 100644 --- a/absl/copts/GENERATED_copts.bzl +++ b/absl/copts/GENERATED_copts.bzl @@ -95,6 +95,7 @@ ABSL_LLVM_FLAGS = [ "-Wno-implicit-int-conversion", "-Wno-shorten-64-to-32", "-Wno-sign-conversion", + "-Wno-unknown-warning-option", "-DNOMINMAX", ] diff --git a/absl/copts/copts.py b/absl/copts/copts.py index 7268c680..0d6c1ec3 100644 --- a/absl/copts/copts.py +++ b/absl/copts/copts.py @@ -112,6 +112,9 @@ COPT_VARS = { "-Wno-implicit-int-conversion", "-Wno-shorten-64-to-32", "-Wno-sign-conversion", + # Disable warnings on unknown warning flags (when warning flags are + # unknown on older compiler versions) + "-Wno-unknown-warning-option", # Don't define min and max macros (Build on Windows using clang) "-DNOMINMAX", ], -- cgit v1.2.3