From 517cd3ee028c95b1b81c0c08e77dc7260e61768d Mon Sep 17 00:00:00 2001 From: Mithun Sivanesan Date: Mon, 1 Jun 2026 17:08:23 +1000 Subject: [PATCH] Added info on -j arg for ./b target --- src/book/02-system/01-foundations/02-build-system.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index ecc618444..f65d62739 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -360,7 +360,7 @@ Any changes you make outside of the `/home/nubots/NUbots` or `/home/nubots/build ##### Target -The `target` command of `b` allows you to build code for a different target. Support targets are +The `target` command of `b` allows you to build code for a different target. Supported targets are - `generic`: Useful if you would like to build and run code on your local machine. - `nuc7i7bnh`: For use with the old nuc7i7bnh computer. This is no longer used on the robots. @@ -369,6 +369,14 @@ The `target` command of `b` allows you to build code for a different target. Sup The `target` command will download (or, if needed, build) the Docker image for the specified target and then mark that target as active. + + +If you do need to build the image from scratch, and you find you are running out of memory during the build process, you can set the maximum number of jobs the builder can run by adding the `-j` argument. + +For example, `./b target nuc12wshi7 -j8` will only run a maximum of eight jobs. + + + ##### Tests The `tests` command allows you to run built unit tests. It will automatically run tests in parallel, and dump a timestamped log file to the project directory. Currently, we use [CTest](https://cmake.org/cmake/help/latest/manual/ctest.1.html) which is included as part of CMake.