[fuzztest] Use full optimization on engine parts

This ensures that fuzztest and centipede engine components are
optimized with -O2 even if the fuzz targets are configured to
compile with a lower optimization level (e.g. optimize_for_fuzzing
leading to -O1 or is_debug leading to -O0).

This leads to a faster and smaller engine in debug builds. It also
leads to fewer instrumented PCs in the engine parts which as
a side-effect also fixes the infinite loop in issue 326905381.

Tested locally with a V8 fuzztest target in release and debug with
asan.

Bug: 326905381
Cq-Include-Trybots: luci.chromium.try:linux-centipede-asan-rel
Cq-Include-Trybots: luci.chromium.try:linux-libfuzzer-asan-rel
Change-Id: If21efc6b78b466ecd431747ce35930c66f821767
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5343814
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268364}
NOKEYCHECK=True
GitOrigin-RevId: 3f3365dd4fe475c8133b07e9f3b56b5c51a4cdb7
1 file changed
tree: 30cb0526b170bac334c76a51609ecffab0e3b209
  1. BUILD.gn
  2. OWNERS
  3. README.chromium