Skip to content

Commit

Permalink
Refresh cobalt_evergreen_overview.md for Cobalt 23 (#1971)
Browse files Browse the repository at this point in the history
This a smaller change than
#1117 and mostly just cleans up
old GYP references.

b/62677273

Change-Id: Idc9e51463099babf77a92f9fb5c830f9def01084
  • Loading branch information
hlwarriner committed Nov 14, 2023
1 parent c2bae16 commit e58a2d9
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions starboard/doc/evergreen/cobalt_evergreen_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,38 +90,43 @@ Evergreen](resources/cobalt_evergreen_overview_vs_non_evergreen.png)

### Building Cobalt Evergreen Components

Cobalt Evergreen requires that there are two separate build(`gyp`)
Cobalt Evergreen requires that there are two separate build
configurations used due to the separation of the Cobalt core(`libcobalt.so`) and
the platform-specific Starboard layer(`loader_app`). As a result, you will have
to initiate a separate gyp process for each. This is required since the Cobalt
core binary is built with the Google toolchain settings and the
platform-specific Starboard layer is built with partner toolchain
configurations.
the platform-specific layers. As a result, you will have to run `gen gn`
separately for each. This is required since the Cobalt core binary is built
with the Google toolchain settings and the components in the platform-specific
Starboard layer are built with partner toolchain configurations.

Cobalt Evergreen is built by a separate gyp platform using the Google toolchain:
Cobalt Evergreen is built by a separate GN platform using the Google toolchain.
For example:

```
$ cobalt/build/gn.py -p evergreen-arm-softfp -c qa
$ ninja -C out/evergreen-arm-softfp_qa cobalt
$ gn gen out/evergreen-arm-softfp_qa --args="target_platform=\"evergreen-arm-softfp\" build_type=\"qa\" target_cpu=\"arm\" target_os=\"linux\" sb_api_version=14"
$ ninja -C out/evergreen-arm-softfp_qa cobalt_install
```

Which produces a shared library `libcobalt.so` targeted for specific
architecture, ABI and Starboard version.

The gyp variable `sb_evergreen` is set to 1 when building `libcobalt.so`.
The GN variable `sb_is_evergreen` is set to `true` when building `libcobalt.so`.

Finally, note that these instructions are for producing a local build of
`libcobalt.so`. For submissions to YTS and deployments to users' devices, an
official release build of `libcobalt.so` should be downloaded from GitHub.

The partner port of Starboard is built with the partner’s toolchain and is
linked into the `loader_app` which knows how to dynamically load
`libcobalt.so`, and the `crashpad_handler` which handles crashes.

```
$ cobalt/build/gn.py -p <partner_port_name> -c qa
$ gn gen out/<partner_port_name>_qa --args='target_platform="<partner_port_name>" build_type="qa" sb_api_version=14'
$ ninja -C out/<partner_port_name>_qa loader_app crashpad_handler
```

Partners should set `sb_evergreen_compatible` to 1 in their gyp platform config.
DO NOT set the `sb_evergreen` to 1 in your platform-specific configuration as it
is used only by Cobalt when building with the Google toolchain.
Partners should set `sb_is_evergreen_compatible` to `true` in their GN platform
config. DO NOT set the `sb_is_evergreen` to `true` in your platform-specific
configuration as it is used only by Cobalt when building with the Google
toolchain.

Additionally, partners should install crash handlers as instructed in the
[Installing Crash Handlers for Cobalt guide](../crash_handlers.md).
Expand Down

0 comments on commit e58a2d9

Please sign in to comment.