From 7320ac5277cee7d256cae517c218229eaa259f3b Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 17 Sep 2019 10:58:41 +0200 Subject: [PATCH] Re-enable optimize_max to fix UBSan. This reverts the changes to BUILD.gn done by [1] because they were breaking UBSan. At least one between: //build/config/compiler:default_optimization //build/config/compiler:optimize_max need to be selected, this CL re-enables optimize_max since that was the previous default. [1] - https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1790959 Bug: None Change-Id: I136179c2e814f7aba9cc8515cc4825cbd41f8abb Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1809137 Commit-Queue: Frank Barchard Reviewed-by: Frank Barchard --- BUILD.gn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 1bdb68681..2196be415 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -162,8 +162,9 @@ static_library("libyuv_internal") { # crbug.com/538243). if (!is_debug || is_nacl) { configs -= [ "//build/config/compiler:default_optimization" ] + # Enable optimize for speed (-O2) over size (-Os). - #configs += [ "//build/config/compiler:optimize_max" ] + configs += [ "//build/config/compiler:optimize_max" ] } # To enable AVX2 or other cpu optimization, pass flag here