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

Side by Side Diff: tools/gn/docs/cookbook.md

Issue 1151303006: clang/win: Make everything work in a GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nacl fix Created 5 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 unified diff | Download patch
« no previous file with comments | « third_party/mesa/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # GYP->GN Conversion Cookbook 1 # GYP->GN Conversion Cookbook
2 2
3 [TOC] 3 [TOC]
4 4
5 ## Targets 5 ## Targets
6 6
7 | *GYP* | *GN* | 7 | *GYP* | *GN* |
8 |:-------------------------------------------------|:--------------------------- ------------------------| 8 |:-------------------------------------------------|:--------------------------- ------------------------|
9 | `'type': 'static_library', 'name': 'foo',` | `static_library("foo") {` o r `source_set("foo") {` | 9 | `'type': 'static_library', 'name': 'foo',` | `static_library("foo") {` o r `source_set("foo") {` |
10 | `'type': 'shared_library', 'name': 'foo',` | `shared_library("foo") {` | 10 | `'type': 'shared_library', 'name': 'foo',` | `shared_library("foo") {` |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 At least half of the warnings in these blocks are already disabled 477 At least half of the warnings in these blocks are already disabled
478 globally (we added more global ones later). From the command line, do: 478 globally (we added more global ones later). From the command line, do:
479 479
480 ``` 480 ```
481 $ cd src/build/config 481 $ cd src/build/config
482 $ git grep 4018 482 $ git grep 4018
483 compiler/BUILD.gn: "/wd4018", # Comparing signed and unsigned values. 483 compiler/BUILD.gn: "/wd4018", # Comparing signed and unsigned values.
484 ``` 484 ```
485 485
486 tells us that warning 4018 is already disabled globally from the 486 tells us that warning 4018 is already disabled globally from the
487 `//build/config/compiler:default_warnings` config, and the same for 487 `default_warning_flags` variable in `//build/config/compiler`, and the same
488 4244. So ignore these. 488 for 4244. So ignore these.
489 489
490 Always comment what the warning is. Use your favorite search engine and 490 Always comment what the warning is. Use your favorite search engine and
491 type "vc warning 4267" to look it up. You'll end up with: 491 type "vc warning 4267" to look it up. You'll end up with:
492 492
493 ``` 493 ```
494 if (is_win) { 494 if (is_win) {
495 cflags += [ 495 cflags += [
496 "/wd4267", # Conversion from size_t to 'type'. 496 "/wd4267", # Conversion from size_t to 'type'.
497 ] 497 ]
498 } 498 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 ``` 644 ```
645 import("//mojo/public/tools/bindings/mojom.gni") 645 import("//mojo/public/tools/bindings/mojom.gni")
646 646
647 mojom("mojo_bindings") { 647 mojom("mojo_bindings") {
648 sources = [ 648 sources = [
649 "foo.mojom", 649 "foo.mojom",
650 ] 650 ]
651 } 651 }
652 ``` 652 ```
OLDNEW
« no previous file with comments | « third_party/mesa/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698