Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: content/BUILD.gn

Issue 1833193002: Content "gn check" work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/crash/content/app/BUILD.gn ('k') | content/app/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/BUILD.gn
diff --git a/content/BUILD.gn b/content/BUILD.gn
index 1d32ad24a201bd4f5ef13729755950ad2a915404..1ece4f97f491eb1ca10ff27a65a350fc71b3bcc1 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -37,6 +37,23 @@ config("content_implementation") {
# //content/public/browser and similar targets to avoid double-linking (these
# targets make sure the dependency goes through the content shared library
# when doing a component build).
+#
+# TESTS
+# -----
+# Tests are a challenge. The content tests need to access internals of
+# content/browser, for example, but the tests themselves are outside of the
+# content component (which is a shared library in the component build). To
+# prevent external-to-content targets from depending on private headers,
+# the non-public content/browser target is not a public dep of the content
+# component. But this means there is also no public path for the content
+# tests and no way to restrict that just to //content/test/* if we added one.
+#
+# As a result, we check deps for //content/test/* only in non-component builds
+# (which should verify the dependencies are correct for both component and
+# non-component cases equally). There are targets like
+# //content/browser:for_content_tests that allow content/test to depend on the
+# //content/browser target only in non-component builds (when there are no
+# linking problems) for when check is enabled.
if (!is_nacl_nonsfi) {
content_shared_components = [
@@ -99,6 +116,7 @@ grit("resources") {
# This target exists to "hold" the content_export header so we can do proper
# inclusion testing of it.
source_set("export") {
+ # Must only be used inside of content.
visibility = [ "//content/*" ]
sources = [
"common/content_export.h",
« no previous file with comments | « components/crash/content/app/BUILD.gn ('k') | content/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698