[cpp] Suppress C++20 warning

We need a public config to protect downstream consumers and suppress a
warning that prevents us from building in C++20 mode.

Test: Add --experimental_cxx_version=20 to args.gn and fx build

Change-Id: I7177b7cb30cd4853bafb4288b1f8fe8cd09d8746
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/processor-trace/+/635942
Reviewed-by: Roland McGrath <mcgrathr@google.com>
diff --git a/libipt/BUILD.gn b/libipt/BUILD.gn
index cc29d63..eb3fe1c 100644
--- a/libipt/BUILD.gn
+++ b/libipt/BUILD.gn
@@ -11,6 +11,11 @@
   ]
 }
 
+config("libipt_public_config") {
+  # Warnings that downstream consumers need protection from
+  cflags = [ "-Wno-deprecated-anon-enum-enum-conversion" ]
+}
+
 static_library("libipt") {
   sources = [
     "include/intel-pt.h",
@@ -106,4 +111,5 @@
   ]
 
   configs += [ ":libipt_config" ]
+  public_configs = [ ":libipt_public_config" ]
 }