Skip to content

Conversation

omjavaid
Copy link
Contributor

When using --use-make=ninja or --use-make=ninja.exe, the build would previously fail because CMake was not instructed to generate the corresponding Ninja build files. It would default to generating Makefiles for Linux or Visual Studio MSBuild files for Windows.

This change detects when the specified make program is ninja and automatically adds the -G Ninja flag to the CMake config step.

When using `--use-make=ninja` or `--use-make=ninja.exe`, the build
would previously fail because CMake was not instructed to generate
the corresponding Ninja build files. It would default to generating
Makefiles for Linux or Visual Studio MSBuild files for Windows.

This change detects when the specified make program is ninja and
automatically adds the `-G Ninja` flag to the CMake config step.
@omjavaid omjavaid requested review from DavidSpickett and antmox June 24, 2025 08:49
Copy link
Contributor

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

Surprised that no one else ran across this, I guess you're just the first person to try this via the LNT runner rather than cmake. Istr someone adding support for ninja a while ago.

LGTM.

@omjavaid omjavaid merged commit d6a7c2c into llvm:main Jun 30, 2025
1 check passed
@lukel97
Copy link
Contributor

lukel97 commented Aug 12, 2025

Surprised that no one else ran across this, I guess you're just the first person to try this via the LNT runner rather than cmake. Istr someone adding support for ninja a while ago.

Sorry this is so late, just seeing this PR now. We were using CMAKE_GENERATOR=Ninja lnt ... to instruct CMake to use Ninja

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.

3 participants