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

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

Issue 1335313003: Replace instances of datadeps --> data_deps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make formatter recognize both datadeps and data_deps Created 5 years, 3 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 | « tools/gn/command_format.cc ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # GN Language and Operation 1 # GN Language and Operation
2 2
3 [TOC] 3 [TOC]
4 4
5 ## Introduction 5 ## Introduction
6 6
7 This page describes many of the language details and behaviors. 7 This page describes many of the language details and behaviors.
8 8
9 ### Use the built-in help! 9 ### Use the built-in help!
10 10
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 # the default toolchain. Pick the right one according to the current CPU 510 # the default toolchain. Pick the right one according to the current CPU
511 # architecture. 511 # architecture.
512 if (target_cpu == "x64") { 512 if (target_cpu == "x64") {
513 set_default_toolchain("//toolchains:64") 513 set_default_toolchain("//toolchains:64")
514 } else if (target_cpu == "x86") { 514 } else if (target_cpu == "x86") {
515 set_default_toolchain("//toolchains:32") 515 set_default_toolchain("//toolchains:32")
516 } 516 }
517 ``` 517 ```
518 518
519 If a 64-bit target wants to depend on a 32-bit binary, it would specify 519 If a 64-bit target wants to depend on a 32-bit binary, it would specify
520 a dependency using `datadeps` (data deps are like deps that are only 520 a dependency using `data_deps` (data deps are like deps that are only
521 needed at runtime and aren't linked, since you can't link a 32-bit and a 521 needed at runtime and aren't linked, since you can't link a 32-bit and a
522 64-bit library). 522 64-bit library).
523 523
524 ``` 524 ```
525 executable("my_program") { 525 executable("my_program") {
526 ... 526 ...
527 if (target_cpu == "x64") { 527 if (target_cpu == "x64") {
528 # The 64-bit build needs this 32-bit helper. 528 # The 64-bit build needs this 32-bit helper.
529 datadeps = [ ":helper(//toolchains:32)" ] 529 data_deps = [ ":helper(//toolchains:32)" ]
530 } 530 }
531 } 531 }
532 532
533 if (target_cpu == "x86") { 533 if (target_cpu == "x86") {
534 # Our helper library is only compiled in 32-bits. 534 # Our helper library is only compiled in 32-bits.
535 shared_library("helper") { 535 shared_library("helper") {
536 ... 536 ...
537 } 537 }
538 } 538 }
539 ``` 539 ```
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 settings which work a bit differently in Blaze. This is partially to 725 settings which work a bit differently in Blaze. This is partially to
726 make conversion from the existing GYP code easier, and the GYP 726 make conversion from the existing GYP code easier, and the GYP
727 constructs generally offer more fine-grained control (which is either 727 constructs generally offer more fine-grained control (which is either
728 good or bad, depending on the situation). 728 good or bad, depending on the situation).
729 729
730 GN also uses GYP names like "sources" instead of "srcs" since 730 GN also uses GYP names like "sources" instead of "srcs" since
731 abbreviating this seems needlessly obscure, although it uses Blaze's 731 abbreviating this seems needlessly obscure, although it uses Blaze's
732 "deps" since "dependencies" is so hard to type. Chromium also compiles 732 "deps" since "dependencies" is so hard to type. Chromium also compiles
733 multiple languages in one target so specifying the language type on the 733 multiple languages in one target so specifying the language type on the
734 target name prefix was dropped (e.g. from `cc_library`). 734 target name prefix was dropped (e.g. from `cc_library`).
OLDNEW
« no previous file with comments | « tools/gn/command_format.cc ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698