From 5aaa603e120d84cbaf74a29484d63ec0bbbce87e Mon Sep 17 00:00:00 2001 From: Dirk Pranke Date: Fri, 1 May 2015 14:26:13 -0700 Subject: Adjust the visibility of the standalone targets in the GN build. As part of the migration from GYP->GN, we want to make sure that we can track when new targets are added to either the GYP or GN builds and that we are building everything we expect to build. In GN, unlike GYP, if a build file gets referenced from other files, building 'all' will cause every target to be built in it. This means in particular, that we can end up trying to build targets that are not necessarily intended to be visible to the rest of the build. To get around this, any target that is defined but hidden (like 'pdfium_unittests', ) should still be visible to a top-level target called "//:gn_visibility". R=tsepez@chromium.org, brettw@chromium.org BUG=461019 Review URL: https://codereview.chromium.org/1120183002 --- BUILD.gn | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 240401acf9..c0d57c3bb3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -135,8 +135,12 @@ static_library("pdfium") { } } -# Targets below this are only visible within this file. -visibility = [ ":*" ] +# Targets below this are only visible within this file (and to the +# top-level gn_visibility target used to help gn_all build everything). +visibility = [ + ":*", + "//:gn_visibility", +] static_library("fdrm") { sources = [ -- cgit v1.2.3