[PSA] Removing ninja binaries from depot_tools

530 views
Skip to first unread message

Junji Watanabe

unread,
Jan 10, 2023, 5:08:27 PM1/10/23
to Chromium-dev

Hi,


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.


Regards,

Junji - Chrome Browser Build team




Junji Watanabe

unread,
Jan 31, 2023, 12:07:03 AM1/31/23
to Chromium-dev, Junji Watanabe
Hi,

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`

dan...@chromium.org

unread,
Jan 31, 2023, 2:35:13 PM1/31/23
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

Cheers,
Dana

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
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

unread,
Jan 31, 2023, 2:44:10 PM1/31/23
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

unread,
Jan 31, 2023, 4:49:16 PM1/31/23
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

unread,
Jan 31, 2023, 9:06:32 PM1/31/23
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.
e.g. 
`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

unread,
Feb 9, 2023, 11:40:03 PM2/9/23
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

unread,
Feb 10, 2023, 4:06:10 PM2/10/23
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
Forward
0 new messages