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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 places are noted in the table below. | 197 places are noted in the table below. |
198 | 198 |
199 | *GYP* | *GN*
| *GN import* | | 199 | *GYP* | *GN*
| *GN import* | |
200 |:------------------------------------------------|:----------------------------
---------------|:-----------------------------------------------| | 200 |:------------------------------------------------|:----------------------------
---------------|:-----------------------------------------------| |
201 | `arm_float_abi` | `arm_float_abi`
| `//build/config/arm.gni` | | 201 | `arm_float_abi` | `arm_float_abi`
| `//build/config/arm.gni` | |
202 | `arm_neon` (0/1) | `arm_use_neon` (true/false)
| `//build/config/arm.gni` | | 202 | `arm_neon` (0/1) | `arm_use_neon` (true/false)
| `//build/config/arm.gni` | |
203 | `arm_neon_optional` (0/1) | `arm_optionally_use_neon` (t
rue/false) | `//build/config/arm.gni` | | 203 | `arm_neon_optional` (0/1) | `arm_optionally_use_neon` (t
rue/false) | `//build/config/arm.gni` | |
204 | `arm_version` | `arm_version`
| `//build/config/arm.gni` | | 204 | `arm_version` | `arm_version`
| `//build/config/arm.gni` | |
205 | `asan` (0/1) | `is_asan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | | 205 | `asan` (0/1) | `is_asan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | |
206 | `branding` ("Chromium"/"Chrome") | `is_chrome_branded` (true/fa
lse) | `//build/config/chrome_build.gni` | | 206 | `branding` ("Chromium"/"Chrome") | `is_chrome_branded` (true/fa
lse) | `//build/config/chrome_build.gni` | |
207 | `build_for_tool=="drmemory"` | `enable_iterator_debugging=f
alse` | (internal to `//build/config/BUILD.gn`) | | |
208 | `build_for_tool=="tsan"` | `enable_iterator_debugging=f
alse` | (internal to `//build/config/BUILD.gn`) | | 207 | `build_for_tool=="tsan"` | `enable_iterator_debugging=f
alse` | (internal to `//build/config/BUILD.gn`) | |
209 | `buildtype` ("Official"/"Dev") | `is_official_build` (true/fa
lse) | `//build/config/chrome_build.gni` | | 208 | `buildtype` ("Official"/"Dev") | `is_official_build` (true/fa
lse) | `//build/config/chrome_build.gni` | |
210 | `chrome_multiple_dll` (0/1) | `is_multi_dll_chrome` (true/
false) | `//build/config/chrome_build.gni` | | 209 | `chrome_multiple_dll` (0/1) | `is_multi_dll_chrome` (true/
false) | `//build/config/chrome_build.gni` | |
211 | `clang` (0/1) | `is_clang` (true/false)
| (global) | | 210 | `clang` (0/1) | `is_clang` (true/false)
| (global) | |
212 | `clang_use_chrome_plugins` (0/1) | `clang_use_chrome_plugins` (
true/false) | (internal to `//build/config/clang/BUILD.gn`) | | 211 | `clang_use_chrome_plugins` (0/1) | `clang_use_chrome_plugins` (
true/false) | (internal to `//build/config/clang/BUILD.gn`) | |
213 | `component` ("shared_library"/"static_library") | `is_component_build` (true/f
alse) | (global) | | 212 | `component` ("shared_library"/"static_library") | `is_component_build` (true/f
alse) | (global) | |
214 | `desktop_linux` (0/1) | `is_desktop_linux` (true/fal
se) | (global) | | 213 | `desktop_linux` (0/1) | `is_desktop_linux` (true/fal
se) | (global) | |
215 | `disable_glibcxx_debug` (0/1) | `enable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | | 214 | `disable_glibcxx_debug` (0/1) | `enable_iterator_debugging`
(true/false) | (internal to `//build/config/BUILD.gn`) | |
216 | `fastbuild` (0/1/2) | `symbol_level` (2/1/0 — valu
es inverted) | `//build/config/compiler/compiler.gni` | | 215 | `fastbuild` (0/1/2) | `symbol_level` (2/1/0 — valu
es inverted) | `//build/config/compiler/compiler.gni` | |
217 | `gomadir` | `goma_dir`
| `//build/toolchain/goma.gni` | | 216 | `gomadir` | `goma_dir`
| `//build/toolchain/goma.gni` | |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 674 |
676 ``` | 675 ``` |
677 import("//mojo/public/tools/bindings/mojom.gni") | 676 import("//mojo/public/tools/bindings/mojom.gni") |
678 | 677 |
679 mojom("mojo_bindings") { | 678 mojom("mojo_bindings") { |
680 sources = [ | 679 sources = [ |
681 "foo.mojom", | 680 "foo.mojom", |
682 ] | 681 ] |
683 } | 682 } |
684 ``` | 683 ``` |
OLD | NEW |