Abseil C++#
Pigweed AI summary: The Abseil C++ module provides build files for including upstream Abseil C++. To use Abseil C++, one must add it to the workspace using the git submodule command and set the GN var dir_pw_third_party_abseil-cpp to the location of the source. The GN build files are generated from the third-party Bazel build files using a script that should be re-run whenever the submodule is updated or the JSON file is modified. The update script was last run for revision
The $dir_pw_third_party/abseil-cpp/
module provides build files to allow
optionally including upstream Abseil C++.
Using upstream Abseil C++#
Pigweed AI summary: This section provides instructions for using Abseil C++ in a workspace, including adding it as a submodule and setting the GN var to the location of the source. The GN build files are generated from the third-party Bazel build files using a script that should be re-run whenever the submodule is updated or the JSON file is modified. The update script was last run for revision 67f9650.
If you want to use Abseil C++, you must do the following:
Submodule#
Pigweed AI summary: This paragraph provides a command to add Abseil C++ to a workspace using a git submodule.
Add Abseil C++ to your workspace with the following command.
git submodule add https://github.com/abseil/abseil-cpp.git \
third_party/abseil-cpp/src
GN#
Pigweed AI summary: This paragraph provides instructions on how to set the GN variable "dir_pw_third_party_abseil-cpp" to the location of the Abseil C++ source, which can be done in the args.gn or .gn file using the specified code.
Set the GN var
dir_pw_third_party_abseil-cpp
to the location of the Abseil C++ source.If you used the command above, this will be
//third_party/abseil-cpp/src
This can be set in your args.gn or .gn file like:
dir_pw_third_party_abseil_cpp = "//third_party/abseil-cpp/src"
Updating#
Pigweed AI summary: The GN build files are created from third-party Bazel build files using a script called generate_3p_gn.py. This script uses data from the repo.json file located in the abseil-cpp directory. It is important to re-run the script whenever the submodule is updated or the JSON file is modified. The location of the Bazel repository can be specified using the -w option.
The GN build files are generated from the third-party Bazel build files using $dir_pw_build/py/pw_build/generate_3p_gn.py.
The script uses data taken from $dir_pw_third_party/abseil-cpp/repo.json
.
The script should be re-run whenever the submodule is updated or the JSON file
is modified. Specify the location of the Bazel repository can be specified using
the -w
option, e.g.
python pw_build/py/pw_build/generate_3p_gn.py \
-w third_party/abseil-cpp/src
Version#
Pigweed AI summary: The update script was last run for revision 67f9650 of the Abseil C++ library.
The update script was last run for revision 67f9650.