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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | `GYP_MSVS_OVERRIDE_PATH` environment variable | `visual_studio_path`
| `//build/config/win/visual_studio_version.gni` | | 183 | `GYP_MSVS_OVERRIDE_PATH` environment variable | `visual_studio_path`
| `//build/config/win/visual_studio_version.gni` | |
184 | `GYP_MSVS_VERSION` environment variable | (none)
| | | 184 | `GYP_MSVS_VERSION` environment variable | (none)
| | |
185 | `ios_sdk_path` | `ios_sdk_path` and `use_ios_
simulator` | `//build/config/ios/ios_sdk.gni` | | 185 | `ios_sdk_path` | `ios_sdk_path` and `use_ios_
simulator` | `//build/config/ios/ios_sdk.gni` | |
186 | `lsan` (0/1) | `is_lsan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | | 186 | `lsan` (0/1) | `is_lsan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | |
187 | `mac_sdk_min` | `mac_sdk_min`
| `//build/config/mac/mac_sdk.gni` | | 187 | `mac_sdk_min` | `mac_sdk_min`
| `//build/config/mac/mac_sdk.gni` | |
188 | `mac_sdk_path` | `mac_sdk_path`
| `//build/config/mac/mac_sdk.gni` | | 188 | `mac_sdk_path` | `mac_sdk_path`
| `//build/config/mac/mac_sdk.gni` | |
189 | `mac_sdk` | `mac_sdk_version`
| `//build/config/mac/mac_sdk.gni` | | 189 | `mac_sdk` | `mac_sdk_version`
| `//build/config/mac/mac_sdk.gni` | |
190 | `msan` (0/1) | `is_msan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | | 190 | `msan` (0/1) | `is_msan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | |
191 | `SDKROOT` (Mac) | `sysroot`
| `//build/config/sysroot.gni` | | 191 | `SDKROOT` (Mac) | `sysroot`
| `//build/config/sysroot.gni` | |
192 | `sysroot` | `sysroot`
| `//build/config/sysroot.gni` | | 192 | `sysroot` | `sysroot`
| `//build/config/sysroot.gni` | |
193 | `target_arch` ("ia32"/"x64"/"arm"/"mipsel") | `target_arch` ("x86"/"x64"/"
arm"/"mipsel") | (global) | | 193 | `target_arch` ("ia32"/"x64"/"arm"/"mipsel") | `target_cpu` ("x86"/"x64"/"a
rm"/"mipsel") | (global) | |
194 | `toolkit_views` (0/1) | `toolkit_views`
| `//build/config/ui.gni` | | 194 | `toolkit_views` (0/1) | `toolkit_views`
| `//build/config/ui.gni` | |
195 | `tsan` (0/1) | `is_tsan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | | 195 | `tsan` (0/1) | `is_tsan` (true/false)
| `//build/config/sanitizers/sanitizers.gni` | |
196 | `windows_sdk_path` | `windows_sdk_path`
| (internal to `//build/config/win/BUILD.gn`) | | 196 | `windows_sdk_path` | `windows_sdk_path`
| (internal to `//build/config/win/BUILD.gn`) | |
197 | 197 |
198 ### Feature flags | 198 ### Feature flags |
199 | 199 |
200 | *GYP* | *GN*
| *GN import* | | 200 | *GYP* | *GN*
| *GN import* | |
201 |:----------------------------------------|:------------------------------------
-----------|:------------------------------| | 201 |:----------------------------------------|:------------------------------------
-----------|:------------------------------| |
202 | `cld_version` (number) | `cld_version` (number)
| `//build/config/features.gni` | | 202 | `cld_version` (number) | `cld_version` (number)
| `//build/config/features.gni` | |
203 | `configuration_policy` (0/1) | `enable_configuration_policy` (true/
false) | `//build/config/features.gni` | | 203 | `configuration_policy` (0/1) | `enable_configuration_policy` (true/
false) | `//build/config/features.gni` | |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 | 641 |
642 ``` | 642 ``` |
643 import("//mojo/public/tools/bindings/mojom.gni") | 643 import("//mojo/public/tools/bindings/mojom.gni") |
644 | 644 |
645 mojom("mojo_bindings") { | 645 mojom("mojo_bindings") { |
646 sources = [ | 646 sources = [ |
647 "foo.mojom", | 647 "foo.mojom", |
648 ] | 648 ] |
649 } | 649 } |
650 ``` | 650 ``` |
OLD | NEW |