• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. _target-host:
2
3----
4host
5----
6The Pigweed host target is used for unit testing and some host side tooling.
7
8Building
9========
10To build for this target, invoke ninja with the top-level "host" group as the
11target to build.
12
13.. code:: sh
14
15  $ ninja -C out host
16
17There are two host toolchains, and both of them can be manually invoked by
18replacing `host` with `host_clang` or `host_gcc`. Not all toolchains are
19supported on all platforms. Unless working specifically on one toolchain, it is
20recommended to leave this to the default.
21
22Running Tests
23=============
24Tests are automatically run as part of the host build, but if you desire to
25manually run tests, you may invoke them from a shell directly.
26
27Example:
28
29... code:: sh
30
31  $ ./out/host_[compiler]_debug/obj/pw_status/status_test
32
33RPC server
34==========
35The host target implements a system RPC server that runs over a local socket,
36defaulting to port 33000. To communicate with a process running the host RPC
37server, use ``pw rpc -s localhost:33000 <protos>``.
38
39Configuration
40=============
41The host target exposes a few options that may be used to change the host build
42behavior.
43
44pw_build_HOST_TOOLS
45-------------------
46Pigweed includes a number of host-only tooling that may be built as part of the
47host build. These tools are included as part of the bootstrap, so it's only
48necessary to enable this setting when modifying host tooling. This is
49disabled by default.
50