aboutsummaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorMirko Bonadei <mbonadei@chromium.org>2017-12-12 10:54:58 +0100
committerCommit Bot <commit-bot@chromium.org>2017-12-12 13:39:42 +0000
commitd94a4867bf8be91e4c0fa8b7a4133ba060fe524f (patch)
treeb0140ca1969ac397f4a91d9290d5101772b21fd1 /BUILD.gn
parent11dd1b956faee1bbf88f4966e2dba48805d13ec7 (diff)
downloadlibyuv-d94a4867bf8be91e4c0fa8b7a4133ba060fe524f.tar.gz
Using all_dependent_configs to pass libyuv_config around.
Using public_configs, client projects must rely on public_deps to propagate configurations up in the build graph. This is bad because public_deps allows the exposition of headers that live in another target. This can lead to a really unhealthy build. On the other side, all_dependent_configs is automatically propagated up in the build graph but if a target includes a libyuv header it is forced by GN to declare the dependency (and this will propagate libyuv_config). Bug: webrtc:8605, webrtc:8603 Change-Id: I4d71bb5de0b5b62a4ec110349223614f0b98e655 No-Try: True Reviewed-on: https://chromium-review.googlesource.com/822112 Commit-Queue: Mirko Bonadei <mbonadei@chromium.org> Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn3
1 files changed, 2 insertions, 1 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 5bc130d5..0b28db35 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -42,7 +42,7 @@ group("default") {
}
group("libyuv") {
- public_configs = [ ":libyuv_config" ]
+ all_dependent_configs = [ ":libyuv_config" ]
if (is_win && target_cpu == "x64") {
# Compile with clang in order to get inline assembly
@@ -152,6 +152,7 @@ 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" ]
}