diff --git a/.devcontainer/dev_packages.lst b/.devcontainer/dev_packages.lst index 5f3286d6f1..1e4c62cb29 100644 --- a/.devcontainer/dev_packages.lst +++ b/.devcontainer/dev_packages.lst @@ -17,13 +17,24 @@ nano unminimize vim -# Build CMake. +# Build CMake. `g++` comes from `deps_packages.lst`, as CI builds with it; +# `clang` is here for developers who prefer to build with it instead. +# +# `gfortran` is named only to keep the Fortran-only `gcc-16` build that +# Ubuntu 26.04 carries out of the container: `libopenmpi-dev` lists +# `gfortran-16` first among the alternatives it accepts, and Clang, which +# selects the newest GCC installation it finds, cannot link against one that +# provides no C++ standard library. ccache +clang cmake +gfortran ninja-build -# Debug CMake. +# Debug and diagnose CMake. The sanitizer runtimes come with the compilers, +# so building with `-fsanitize=` needs nothing installed here. gdb +valgrind # Build the documentation. python3-sphinx diff --git a/Help/dev/devcontainer.rst b/Help/dev/devcontainer.rst index bbc35f77cb..ff0b63572b 100644 --- a/Help/dev/devcontainer.rst +++ b/Help/dev/devcontainer.rst @@ -111,6 +111,13 @@ against, the container provides: Ubuntu release with ``-rc`` appended. Add it to the ``Suites`` field of ``/etc/apt/sources.list.d/kitware.sources`` to install those as well. +* ``clang``, for developers who would rather build with it than with the + default ``g++``: + + .. code-block:: console + + $ cmake -G Ninja -B build-clang -S . -DCMAKE_CXX_COMPILER=clang++ + * ``ccache``, to speed up repeated builds, e.g.: .. code-block:: console @@ -140,6 +147,18 @@ against, the container provides: * ``gdb``, to debug CMake as described in the `CMake Debugging Guide`_. +* ``valgrind``, and the sanitizer runtimes that come with ``g++`` and + ``clang``, to run CMake and its tests under a memory checker, the way the + sanitizer and Valgrind jobs of our CI do: + + .. code-block:: console + + $ cmake -G Ninja -B build-asan -S . \ + -DCMAKE_C_FLAGS=-fsanitize=address \ + -DCMAKE_CXX_FLAGS=-fsanitize=address + $ cmake --build build-asan + $ ctest --test-dir build-asan + * ``glab``, the `GitLab CLI`_, to work with merge requests, issues, and pipelines on our GitLab instance, and `glab-axi`_, a wrapper around it whose output follows the `AXI`_ conventions: