aboutsummaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2016-10-04 11:50:19 -0700
committerFrank Barchard <fbarchard@google.com>2016-10-04 11:50:19 -0700
commit4b3b310e660e44f1756c0b2383b8124b61ec6329 (patch)
tree5cb52a9c2fc622ac58c7046841614f449efed98e /BUILD.gn
parent7018f5be0f98419c0e4eac518b0641655ba91c98 (diff)
downloadlibyuv-4b3b310e660e44f1756c0b2383b8124b61ec6329.tar.gz
Enable optimize max for GN builds + update docs
Optimize max enables O2 for official builds. Normally release builds are O2 but the official build is Os, affecting performance. The GYP file was previously updated to enable optimize max, which enables ltcg and O2. Documentation updated to show GN builds in docs/getting_started.md BUG=libyuv:642 R=kjellander@chromium.org Review URL: https://codereview.chromium.org/2386093003 .
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn6
1 files changed, 4 insertions, 2 deletions
diff --git a/BUILD.gn b/BUILD.gn
index fd8e2312..1765c13f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -98,9 +98,11 @@ static_library("libyuv") {
deps += [ ":libyuv_msa" ]
}
- if (is_nacl) {
- # Always enable optimization under NaCl to workaround crbug.com/538243 .
+ # Always enable optimization for Release and NaCl builds (to workaround
+ # 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" ]
}
}