mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
Add doc for pw_build.
Change-Id: I2b8b234adadfffc7c3d533613b15fa54ab3d3d8f
This commit is contained in:
parent
31284b8758
commit
84f234e8e1
34
pw_build/build.rst
Normal file
34
pw_build/build.rst
Normal file
|
@ -0,0 +1,34 @@
|
|||
.. _chapter-build:
|
||||
|
||||
.. default-domain:: cpp
|
||||
|
||||
.. highlight:: sh
|
||||
|
||||
--------
|
||||
pw_build
|
||||
--------
|
||||
The build module contains the configuration necessary to build Pigweed using
|
||||
either `GN`_/`Ninja`_ or `Bazel`_.
|
||||
|
||||
.. _GN: https://gn.googlesource.com/gn/
|
||||
.. _Ninja: https://ninja-build.org/
|
||||
.. _Bazel: https://bazel.build/
|
||||
|
||||
GN / Ninja
|
||||
==========
|
||||
The common configuration for GN for all modules is in the ``BUILD.gn`` file.
|
||||
It contains ``config`` declarations referenced by ``BUILD.gn`` files in other
|
||||
modules.
|
||||
|
||||
The ``pw_executable.gni`` file contains a wrapper to build a target for the
|
||||
globally-defined target type, and ``python_script.gni`` makes it easy to run
|
||||
Python scripts as part of build rules.
|
||||
|
||||
Bazel
|
||||
=====
|
||||
The common configuration for Bazel for all modules is in the ``pigweed.bzl``
|
||||
file. The built-in Bazel rules ``cc_binary``, ``cc_library``, and ``cc_test``
|
||||
are wrapped with ``pw_cc_binary``, ``pw_cc_library``, and ``pw_cc_test``.
|
||||
These wrappers add parameters to calls to the compiler and linker.
|
||||
|
||||
The ``BUILD`` file is merely a placeholder and currently does nothing.
|
Loading…
Reference in New Issue
Block a user