Add documentation about no sources for GN guide.
This just adds another consideration for source sets versus static libraries.
TBR=dpranke
Review-Url: https://codereview.chromium.org/2082103002
Cr-Original-Commit-Position: refs/heads/master@{#401103}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 120e860e372e1654422696dcb8ab49a22e438d78
diff --git a/tools/gn/docs/style_guide.md b/tools/gn/docs/style_guide.md
index 29d6b31..a87ad8f 100644
--- a/tools/gn/docs/style_guide.md
+++ b/tools/gn/docs/style_guide.md
@@ -183,6 +183,11 @@
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