[PSA] Removing ninja binaries from depot_tools

Skip to first unread message

Junji Watanabe

Jan 10, 2023, 5:08:27 PMJan 10
to Chromium-dev


As announced previously,  we are deprecating ninja binaries in depot_tools.

We are going to remove the legacy ninja binaries from depot_tools at the end of January 2023.

What do I need to do?

For Developers who build on Windows, instead of calling “ninja.exe”, please call “ninja” to resolve the depot_tools/ninja.bat wrapper.

Tracking bug: crbug.com/1340825 

Feel free to ask if you have any problems or questions.


Junji - Chrome Browser Build team

Junji Watanabe

Jan 31, 2023, 12:07:03 AMJan 31
to Chromium-dev, Junji Watanabe

Visual Studio IDE integration on Windows is affected since the generated vcxproj files specify `ninja.exe` command.

To fix this, please regenerate vcxproj files specifying the Ninja installed in chromium/src.
This is a sample GN command.
`gn gen --ide=vs --ninja-executable=third_party\ninja\ninja.exe  out\Default`


Jan 31, 2023, 2:35:13 PMJan 31
to jw...@google.com, Chromium-dev
Hi Junji,

Let's ensure any platform specific steps are captured in docs, like https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md


Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/6361324a-e136-413a-93c6-08ef823e01f1n%40chromium.org.

Jeremy Roman

Jan 31, 2023, 2:44:10 PMJan 31
to dan...@chromium.org, jw...@google.com, Chromium-dev
Better yet, can gn be updated to allow chromium/src to point at a default path to ninja.exe, so that this isn't required? (I say not being an MSVC user myself.)

Dirk Pranke

Jan 31, 2023, 4:49:16 PMJan 31
to jbr...@chromium.org, dan...@chromium.org, jw...@google.com, Chromium-dev
It would be tricky to do that, since the path would vary by platform and I'm not sure how much, if any, we'd want to bake into ninja.

It's possible that we could use conditionals based on the host_os builtin that would be good enough.

I've filed http://crbug.com/gn/323 to track this request.

-- Dirk

Junji Watanabe

Jan 31, 2023, 9:06:32 PMJan 31
to Dirk Pranke, jbr...@chromium.org, dan...@chromium.org, Chromium-dev
I apologize that the GN command I shared seems wrong. You need to specify an absolute path.
`gn gen --ide=vs --ninja-executable=\path\to\third_party\ninja\ninja.exe  out\Default`

I updated the document in https://crrev.com/c/4206949 

> http://crbug.com/gn/323  
Thank you for filing this request.

Junji Watanabe

Feb 9, 2023, 11:40:03 PMFeb 9
to Bang He, Chromium-dev, jbr...@chromium.org, dan...@chromium.org, Dirk Pranke
FWIU, `gn gen --ninja-executable` doesn't change ninja files.
I don't have a Visual Code environment. But I confirmed that running ninja from CLI doesn't recompile.

PS C:\src\chromium\src> gn gen --ide=vs --ninja-executable=C:\src\chromium\src\third_party\ninja\ninja.exe out\vs --args="..."
PS C:\src\chromium\src> ninja -C out\vs base
ninja: Entering directory `out\vs'
ninja: no work to do.

On Fri, Feb 10, 2023 at 11:46 AM Bang He <hezha...@gmail.com> wrote:
I have executed this command without the `--ninja-executable` parameter a few days ago.
Now, if I execute the command again with the  `--ninja-executable` parameter, will the compilation be full compilation?

Bang He

Feb 10, 2023, 4:06:10 PMFeb 10
to Chromium-dev, Junji Watanabe, jbr...@chromium.org, dan...@chromium.org, Chromium-dev, Dirk Pranke
I have executed this command without the `--ninja-executable` parameter a few days ago.
Now, if I execute the command again with the  `--ninja-executable` parameter, will the compilation be full compilation?

On Wednesday, February 1, 2023 at 10:06:32 AM UTC+8 Junji Watanabe wrote:
Reply all
Reply to author
0 new messages