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

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

Issue 2430153004: gn docs: Update toolchain example in the language reference (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | 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 # 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 two toolchains: 600 two toolchains:
601 601
602 ``` 602 ```
603 toolchain("32") { 603 toolchain("32") {
604 tool("cc") { 604 tool("cc") {
605 ... 605 ...
606 } 606 }
607 ... more tools ... 607 ... more tools ...
608 608
609 # Arguments to the build when re-invoking as a secondary toolchain. 609 # Arguments to the build when re-invoking as a secondary toolchain.
610 toolchain_args() { 610 toolchain_args = {
611 toolchain_cpu = "x86" 611 current_cpu = "x86"
612 } 612 }
613 } 613 }
614 614
615 toolchain("64") { 615 toolchain("64") {
616 tool("cc") { 616 tool("cc") {
617 ... 617 ...
618 } 618 }
619 ... more tools ... 619 ... more tools ...
620 620
621 # Arguments to the build when re-invoking as a secondary toolchain. 621 # Arguments to the build when re-invoking as a secondary toolchain.
622 toolchain_args() { 622 toolchain_args = {
623 toolchain_cpu = "x64" 623 current_cpu = "x64"
624 } 624 }
625 } 625 }
626 ``` 626 ```
627 627
628 The toolchain args specifies the CPU architecture explicitly, so if a 628 The toolchain args specifies the CPU architecture explicitly, so if a
629 target depends on something using that toolchain, that cpu architecture 629 target depends on something using that toolchain, that cpu architecture
630 will be set when re-invoking the build. These args are ignored for the 630 will be set when re-invoking the build. These args are ignored for the
631 default toolchain since by the time they're known the build config has 631 default toolchain since by the time they're known the build config has
632 already been run. In general, the toolchain args and the conditions used 632 already been run. In general, the toolchain args and the conditions used
633 to set the default toolchain should agree. 633 to set the default toolchain should agree.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 GN keeps some GYP concept like "all dependent" settings which work a bit 804 GN keeps some GYP concept like "all dependent" settings which work a bit
805 differently in Blaze. This is partially to make conversion from the existing 805 differently in Blaze. This is partially to make conversion from the existing
806 GYP code easier, and the GYP constructs generally offer more fine-grained 806 GYP code easier, and the GYP constructs generally offer more fine-grained
807 control (which is either good or bad, depending on the situation). 807 control (which is either good or bad, depending on the situation).
808 808
809 GN also uses GYP names like "sources" instead of "srcs" since 809 GN also uses GYP names like "sources" instead of "srcs" since
810 abbreviating this seems needlessly obscure, although it uses Blaze's 810 abbreviating this seems needlessly obscure, although it uses Blaze's
811 "deps" since "dependencies" is so hard to type. Chromium also compiles 811 "deps" since "dependencies" is so hard to type. Chromium also compiles
812 multiple languages in one target so specifying the language type on the 812 multiple languages in one target so specifying the language type on the
813 target name prefix was dropped (e.g. from `cc_library`). 813 target name prefix was dropped (e.g. from `cc_library`).
OLDNEW
« 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