Skip to content

Conversation

@tejlmand
Copy link
Contributor

Calling west build --build-opt="-v" --build-opt="-j=<n>"
passes the build options to cmake --build ... -- <build-opt> which
again is passed to the native build tool, such as ninja or make.

However, when ExternalProjects are used in CMake, such as in TF-M or
sysbuild builds then those extra build options are only passed to the
first image build and not those build as external projects.

CMake supports environment variables for those flags, so translate
verbosity and number of jobs to those environment variables and there

@tejlmand tejlmand requested a review from carlescufi March 11, 2025 08:48
@tejlmand tejlmand requested a review from kylebonnici March 27, 2025 09:16
Copy link
Contributor

@kylebonnici kylebonnici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…build.

Calling `west build --build-opt="-v" --build-opt="-j=<n>"`
passes the build options to `cmake --build ... -- <build-opt>` which
again is passed to the native build tool, such as ninja or make.

However, when ExternalProjects are used in CMake, such as in TF-M or
sysbuild builds then those extra build options are only passed to the
first image build and not those build as external projects.

CMake supports environment variables for those flags, so translate
verbosity and number of jobs to those environment variables and thereby
support those flags for all images when specified by the user.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 63cf79b)
…nv variables

Sysbuild may include several images and when using ninja as build tools
then build options like `ninja -v` or `ninja -j <n>` is only consumed
by the top-level build folder, which is sysbuild itself.

CMake supports setting number of jobs or verbosity using environment
variables.

Document this feature in the Building with sysbuild section.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit e270fd4)
@tejlmand tejlmand force-pushed the west_build_verbose branch from 6560839 to 2cbe2ef Compare March 27, 2025 16:07
@sonarqubecloud
Copy link

@tejlmand tejlmand merged commit c95fb4e into nrfconnect:main Mar 28, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants