| OLD | NEW |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 # ... | 155 # ... |
| 156 } | 156 } |
| 157 ``` | 157 ``` |
| 158 | 158 |
| 159 Other flags only apply to one `BUILD.gn` file and those flags are | 159 Other flags only apply to one `BUILD.gn` file and those flags are |
| 160 declared directly in that file (so other files can't use them). These | 160 declared directly in that file (so other files can't use them). These |
| 161 places are noted in the table below. | 161 places are noted in the table below. |
| 162 | 162 |
| 163 | *GYP* | *GN*
| *GN import* | | 163 | *GYP* | *GN*
| *GN import* | |
| 164 |:------------------------------------------------|:----------------------------
---------------|:-----------------------------------------------| | 164 |:------------------------------------------------|:----------------------------
---------------|:-----------------------------------------------| |
| 165 | `android_src` | `android_src`
| `//build/config/android/config.gni` | | |
| 166 | `android_webview_build` (0/1) | `is_android_webview_build` (
true/false) | `//build/config/android/config.gni` | | |
| 167 | `arm_float_abi` | `arm_float_abi`
| `//build/config/arm.gni` | | 165 | `arm_float_abi` | `arm_float_abi`
| `//build/config/arm.gni` | |
| 168 | `arm_neon` (0/1) | `arm_use_neon` (true/false)
| `//build/config/arm.gni` | | 166 | `arm_neon` (0/1) | `arm_use_neon` (true/false)
| `//build/config/arm.gni` | |
| 169 | `arm_neon_optional` (0/1) | `arm_optionally_use_neon` (t
rue/false) | `//build/config/arm.gni` | | 167 | `arm_neon_optional` (0/1) | `arm_optionally_use_neon` (t
rue/false) | `//build/config/arm.gni` | |
| 170 | `arm_version` | `arm_version`
| `//build/config/arm.gni` | | 168 | `arm_version` | `arm_version`
| `//build/config/arm.gni` | |
| 171 | `asan` (0/1) | `is_asan` (true/false)
| (global) | | 169 | `asan` (0/1) | `is_asan` (true/false)
| (global) | |
| 172 | `branding` ("Chromium"/"Chrome"") | `is_chrome_branded` (true/fa
lse) | (global) | | 170 | `branding` ("Chromium"/"Chrome"") | `is_chrome_branded` (true/fa
lse) | (global) | |
| 173 | `build_for_tool=="drmemory"` | `disable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | | 171 | `build_for_tool=="drmemory"` | `disable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | |
| 174 | `build_for_tool=="tsan"` | `disable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | | 172 | `build_for_tool=="tsan"` | `disable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | |
| 175 | `buildtype` ("Official"/"Dev") | `is_official_build` (true/fa
lse) | (global) | | 173 | `buildtype` ("Official"/"Dev") | `is_official_build` (true/fa
lse) | (global) | |
| 176 | `clang` (0/1) | `is_clang` (true/false)
| (global) | | 174 | `clang` (0/1) | `is_clang` (true/false)
| (global) | |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 | 642 |
| 645 ``` | 643 ``` |
| 646 import("//mojo/public/tools/bindings/mojom.gni") | 644 import("//mojo/public/tools/bindings/mojom.gni") |
| 647 | 645 |
| 648 mojom("mojo_bindings") { | 646 mojom("mojo_bindings") { |
| 649 sources = [ | 647 sources = [ |
| 650 "foo.mojom", | 648 "foo.mojom", |
| 651 ] | 649 ] |
| 652 } | 650 } |
| 653 ``` | 651 ``` |
| OLD | NEW |