From 41c6cc7eb9f0208321ae0f9134a26a34bd31af37 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 12 Oct 2015 14:52:05 -0700 Subject: [PATCH] Enable optimization when compiling for NaCl with GN PNaCl code validation fails when compiling with -O0 due to the linked bug. Always enable optimization when compiling for NaCl to workaround this bug. BUG=538243 R=fbarchard@chromium.org Review URL: https://codereview.chromium.org/1403813002 . --- BUILD.gn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 4ad4c5752..f0f8404b8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -102,6 +102,12 @@ source_set("libyuv") { if (use_neon) { deps += [ ":libyuv_neon" ] } + + if (is_nacl) { + # Always enable optimization under NaCl to workaround crbug.com/538243 . + configs -= [ "//build/config/compiler:default_optimization" ] + configs += [ "//build/config/compiler:optimize_max" ] + } } if (use_neon) {