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

Unified Diff: tools/gn/docs/style_guide.md

Issue 2082103002: Add documentation about no sources for GN guide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/docs/style_guide.md
diff --git a/tools/gn/docs/style_guide.md b/tools/gn/docs/style_guide.md
index 29d6b31e418fd81f92f0c19c7ac1263287c0264c..a87ad8f6a53720da07632145a7f1dea66759cd94 100644
--- a/tools/gn/docs/style_guide.md
+++ b/tools/gn/docs/style_guide.md
@@ -183,6 +183,11 @@ to the link line of the final binary.
and static libraries depending on the build configuration to avoid this
problem.
+ * Source sets can have no sources, while static libraries will give strange
+ platform-specific errors if they have no sources. If a target has only
+ headers (for include checking purposes) or conditionally has no sources on
+ sone platforms, use a source set.
+
* In cases where a lot of the symbols are not needed for a particular link
(this especially happens when linking test binaries), putting that code in
a static library can dramatically increase linking performance. This is
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698