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

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

Issue 1266373002: Fix link typo in gn cookbook doc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/cookbook.md
diff --git a/tools/gn/docs/cookbook.md b/tools/gn/docs/cookbook.md
index 9e9d58b735a510cb9830dd7ec0043495ab6b2cf0..4574057cb50c9dc1bda5e331f8dd1389968a2c13 100644
--- a/tools/gn/docs/cookbook.md
+++ b/tools/gn/docs/cookbook.md
@@ -26,8 +26,8 @@ symbols exported from the shared library.
The last issue is a cause of a lot of headaches in the GYP build. If you
annotate a symbol as exported (i.e. `BASE_EXPORT`) then you can't have
it in a file that goes into a static library because the function might
-be [http://blogs.msdn.com/b/oldnewthing/archive/2014/03/21/10509670.aspx
-stripped out] if it's not called from within the static library. This
Dirk Pranke 2015/08/03 19:18:09 It actually needs to be [text](link), not (text)[l
Bons 2015/08/03 19:23:00 Done.
+be (stripped out)[http://blogs.msdn.com/b/oldnewthing/archive/2014/03/21/10509670.aspx]
+if it's not called from within the static library. This
prevents composing components of static libraries and exporting their
symbols. A source set avoids this issue and `EXPORT` has the desired
meaning of "export from the component this gets linked into" with no
@@ -113,9 +113,9 @@ iterate over a set of sources.
],
}],
],
-```
+```
-### GN
+### GN
```
sources = [
@@ -195,7 +195,7 @@ places are noted in the table below.
| `tsan` (0/1) | `is_tsan` (true/false) | (global) |
| `windows_sdk_path` | `windows_sdk_path` | (internal to `//build/config/win/BUILD.gn`) |
-### Feature flags
+### Feature flags
| *GYP* | *GN* | *GN import* |
|:----------------------------------------|:-----------------------------------------------|:------------------------------|
@@ -260,7 +260,7 @@ places are noted in the table below.
| `win_pdf_metafile_for_printing` (0/1) | `win_pdf_metafile_for_printing` (true/false) | `//build/config/features.gni` |
| `win_use_allocator_shim` (0/1) | | (See "Allocator" below) |
-### Common target conversion
+### Common target conversion
Some targets that lots of projects depend on and how the GN ones
correspond to GYP ones. (This is for commonly-depended-on or weird
@@ -329,14 +329,14 @@ the cycle.
## Other stuff
-### Target conditions
+### Target conditions
`target_conditions` are like normal conditions but expanded in a
different phase of GYP. You can generally just convert the conditions
inside and not worry about the `conditions`/`target_conditions`
difference.
-### xcode_settings
+### xcode_settings
Some xcode settings are obvious:
@@ -364,7 +364,7 @@ search for the string in
tools/gyp/pylib/gyp/xcode_emulation.py]. GYP uses this file to decode
Dirk Pranke 2015/08/03 19:18:09 can you fix this link, too?
Bons 2015/08/03 19:23:00 Done.
the Xcode settings into command line flags for the ninja build.
-### wexit-time destructors
+### wexit-time destructors
Replace
@@ -378,7 +378,7 @@ with
configs += [ "//build/config/compiler:wexit_time_destructors" ]
```
-### Chromium code
+### Chromium code
In GYP code is "non-Chromium" by default, and you opt into higher warning levels using:
@@ -395,7 +395,7 @@ configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
```
-### -fvisibility
+### -fvisibility
All symbols in the build have "hidden" visibility by default (this means
that symbols aren't exported from shared libraries, a concept different
@@ -419,7 +419,7 @@ if (!is_win) {
}
```
-### Dependent settings
+### Dependent settings
In GYP you'll see stuff like this, especially in third-party code.
@@ -466,7 +466,7 @@ GYP would say `export_dependent_settings` to forward
dependency in the `public_deps` section and this will happen
automatically.
-### MSVS disabled warnings
+### MSVS disabled warnings
In GYP you'll see for third-party code:
@@ -500,7 +500,7 @@ if (is_win) {
(Use `=` instead of `+=` is you haven't already defined a `cflags` variable.)
-### Mac frameworks
+### Mac frameworks
GN knows to convert `.framework` files in the `libs` list to the right
thing on Mac. You don't need to specify the directories either. So
@@ -520,7 +520,7 @@ to this:
libs = [ "Accelerate.framework" ]
```
-### hard_dependency
+### hard_dependency
GYP code sometimes sets
@@ -531,7 +531,7 @@ GYP code sometimes sets
to indicate that the current target must be build before its dependents.
GN can deduce this internally, so you can ignore this directive.
-### Allocator
+### Allocator
GYP has `win_use_allocator_shim` and `use_allocator`. In GN, these are
merged into `use_allocator` which is defined in
@@ -560,7 +560,7 @@ Becomes:
As in GYP, the allocator should only be depended on by executables (and
tests). Libraries should not set the allocator.
-### optimize: max
+### optimize: max
In Gyp:
@@ -583,7 +583,7 @@ affects Posix systems. Some components might additionally specify `-O2`
on Posix further optimize, in which case you can remove the `is_win`
check.
-### Protobufs
+### Protobufs
```
import("//third_party/protobuf/proto_library.gni")
@@ -596,7 +596,7 @@ proto_library("myproto") {
See the `third_party/protobuf/proto_library.gni` file for full
documentation and extra flags.
-### Java stuff
+### Java stuff
JNI generator in GYP:
@@ -627,7 +627,7 @@ if (is_android) {
}
```
-### Grit
+### Grit
```
import("//tools/grit/grit_rule.gni")
@@ -639,7 +639,7 @@ grit("resources") {
See `src/build/secondary/tools/grit/grit_rule.gni` for more documentation.
-### Mojo
+### Mojo
```
import("//mojo/public/tools/bindings/mojom.gni")
« 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