[exit-time-destructors] Exclude warning from targets

This CL is part of number of CLs disabling `-Wexit-time-destructors`in
places where this warning is going off. This will allow having this
warning enabled-by-default across the codebase, whilst documenting the
places where corrections for this warning are necessary.

Bug: 40031409
Change-Id: I1003733d31268bdf7bf4f90288de9c8f61b9e468
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/edit/BUILD.gn b/core/fpdfapi/edit/BUILD.gn
index 38db4eb..cae0d59 100644
--- a/core/fpdfapi/edit/BUILD.gn
+++ b/core/fpdfapi/edit/BUILD.gn
@@ -65,6 +65,10 @@
     "../render",
   ]
   pdfium_root_dir = "../../../"
+
+  # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
+  # enable the diagnostic by removing this line.
+  configs = [ "//build/config/compiler:no_exit_time_destructors" ]
 }
 
 pdfium_embeddertest_source_set("embeddertests") {
diff --git a/core/fpdfdoc/BUILD.gn b/core/fpdfdoc/BUILD.gn
index 0bd3ee1..b5da78b 100644
--- a/core/fpdfdoc/BUILD.gn
+++ b/core/fpdfdoc/BUILD.gn
@@ -120,4 +120,8 @@
     "../fpdfapi/render",
   ]
   pdfium_root_dir = "../../"
+
+  # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
+  # enable the diagnostic by removing this line.
+  configs = [ "//build/config/compiler:no_exit_time_destructors" ]
 }
diff --git a/fpdfsdk/BUILD.gn b/fpdfsdk/BUILD.gn
index 1d1acce..fa21e20 100644
--- a/fpdfsdk/BUILD.gn
+++ b/fpdfsdk/BUILD.gn
@@ -166,4 +166,8 @@
   if (pdf_use_skia) {
     deps += [ "//skia" ]
   }
+
+  # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
+  # enable the diagnostic by removing this line.
+  configs = [ "//build/config/compiler:no_exit_time_destructors" ]
 }
diff --git a/fxjs/BUILD.gn b/fxjs/BUILD.gn
index 0e9e23c..870f938 100644
--- a/fxjs/BUILD.gn
+++ b/fxjs/BUILD.gn
@@ -271,6 +271,10 @@
         "../xfa/fxfa/parser",
       ]
     }
+
+    # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
+    # enable the diagnostic by removing this line.
+    configs += [ "//build/config/compiler:no_exit_time_destructors" ]
   }
 
   pdfium_embeddertest_source_set("embeddertests") {
diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn
index 05c3c03..9000505 100644
--- a/testing/fuzzers/BUILD.gn
+++ b/testing/fuzzers/BUILD.gn
@@ -146,6 +146,10 @@
       deps += [ ":fuzzer_xfa_process_state" ]
     }
   }
+
+  # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
+  # enable the diagnostic by removing this line.
+  configs += [ "//build/config/compiler:no_exit_time_destructors" ]
 }
 
 if (is_component_build) {