Building Chromium & V8 with Visual Studio 2026: December 2025

I don’t have to build Chrome (or v8) regularly. But I’ve had a recent occasion to look in the source code to explain an odd behaviour that I was seeing. In doing so, I revisited the steps for how to build Chrome on Windows. The steps evolve over time. This time around I decided that I would use Visual Studio 2026 to perform the build. I’ve now got a script that requires less interaction, which is great given how long a compilation takes. Don’t be surprised if it takes 10-20 hours for the code to compile depending on various factors (such as drive speed, internet bandwidth, processor speed, and other performance characteristics).

I have a build script for Windows and Visual Studio 2026. Unlike a previous version of this script from a post earlier this year, you don’t have to come along to click on an OK mutton to keep the process moving. It should run from beginning to end. This script assume that you already have Visual Studio 2026 and git installed. I’ve got two entry points for the process. One version of a script will run the Visual Studio installer to add the components that are needed (in case you haven’t added them) before starting the build process. Then it runs the steps to check out and start building. The other script only runs the steps necessary to checkout and start building, assuming that you already have the necessary Visual Studio components installed.

If you look in the scripts, you will see that the call command is used a lot. This is because many of the commands for google’s build tools are themselves bath files. If a batch file is invoked without the call command, when it gets done, control does not return to the batch file that was invoking it. If it is invoked with the call command, then control return to the line after the one that invoked it.

The script that installs the Visual Studio components invokes the vs_installer.exe with several arguments to install the various component. I call it with the start /wait command so that the batch file will pause. I’m using the Community edition of Visual Studio. If you are using a different edition, you’ll need to replace instances of the word “Community” with whatever is appropriate for your edition (“Enterprise” or “Professional”). The --passive argument tells the installer to run in passive mode. In this mode it will perform its tasks without requesting any input from the user. The argument --quiet could also work here. But --passive lets you see that the script is doing something.

 
pushd C:\Program Files (x86)\Microsoft Visual Studio\Installer\
start /wait vs_installer.exe install --passive --productid Microsoft.VisualStudio.Product.Community --ChannelId VisualStudio.18.Release --add Microsoft.VisualStudio.Workload.NativeDesktop  --add Microsoft.VisualStudio.Component.VC.ATLMFC  --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.MFC.ARM64  --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang  --includeRecommended
popd
call checkout-chromium-and-build.cmd

Once the VS components are there, we are ready to start building. The Chromium build steps rely on git and some other tools/scripts from google. Those tools haven’t been installed yet. But that doesn’t prevent environment variables from being created for where these tools will be. Since I only need to have these environment variables set for compilation of Chrome and v8, I find it easier to keep them in the batch file rather than set them on the system. In the following, I setup these environment variables to compile on the C: drive. On that drive, I’m putting the tools and the compiled code in child folders of \shares\projects\google. From there, Google’s tools will be in a subfolder called depot_tools and the Chromium and V8 code will be in a subfolder named chromium. The top of the second script sets up all of these environment variables.

ECHO ON
timeout /t 2100 /nobreak 
SET drive=c:
set googlePath=%drive%\shares\projects\google\
SET VS_EDITION=Community
SET NINJA_SUMMARIZE_BUILD=1
set PATH=%googlePath%depot_tools;%PATH%
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
SET vs2022_install=%drive%\Program Files\Microsoft Visual Studio\18\%VS_EDITION%

SET PARALLEL_JOBS=8
IF(%PARALLEL_JOBS% EQU 0) (
    SET JOBS_PARAMETER=-j%PARALLEL_JOBS%    
) else (
    SET JOBS_PARAMETER=
)

Checking out Chromium/V8

Installing Google’s build tools (depot_tools) and the Chromium source occur in the following script. These steps will create the folders that contain both. The call to gclient initializes Google’s build tools after they are present on the drive. Once those are installed we can used the fetch command to retrieve the code for the repository of interest. We what the chromium source. We use fetch chromium to retrieve it. It will deposit the source code in the current folder. Before calling this command, we make a chromium folder to hold the source and call fetch from within it. Usually, after this command completes, the source code should be present in the folder. However, a few times during my tests encountered Google’s server failing to deliver the code. If this happens, then your source code folder ends up in a state in which only part of the code is checked out. If this happens, running gclient to perform a forced sync can resolve the problem. I’ve included a call to this time-consuming command in my script. Its presence is likely to just consume time without any real effect. But it will save some of you headaches. It’s up to you whether it gets removed. Once again, I decided to give weight to reliability over performance. After the source code is acquired, we can move into the src folder to configure and build.

%drive%
mkdir %googlePath%
cd %googlePath%
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
pushd %googlePath%depot_tools

call gclient

popd
mkdir chromium && cd chromium
call fetch chromium
gclient sync -D --force --reset

Configuring and Compiling

I make several calls to configure and compile targets for the chromium code. The targets we care about are chromium and v8 for both release and debug modes. We use the gn command to generate build configurations. The command accepts as arguments the output folder and a string that has other project-specific build parameters. I call the command 5 times for 5 configurations.

gn gen out\Default 
gn gen out\v8Release --args="is_component_build=false is_debug=false symbol_level=1 v8_enable_object_print=true v8_enable_disassembler=true target_cpu=\"x64\" v8_static_library = true v8_use_external_startup_data=false v8_monolithic=true"
gn gen out\v8Debug --args="is_component_build=false is_debug=true  symbol_level=1 v8_enable_object_print=true v8_enable_disassembler=true target_cpu=\"x64\" v8_static_library = true v8_use_external_startup_data=false v8_monolithic=true"
gn gen out\ChromeDebug --args="is_debug=true"
gn gen out\ChromeRelease --args="is_debug=false symbol_level=1"

After configuration, I kick off the builds. Here, the JOBS_PARAMETER variable is used to limit the number of threads that spin-up for compilation. If you set the PARALLEL_JOBS variable to 0 earlier then the JOBS_PARAMETER variable will be blank. This will let the build system decide how many threads to use itself.

Adjustments for Memory Limitations

When I was first working on this script, I was switching between my primary desktop and primary laptop. The desktop has 160 gigs of RAM, the the laptop 72 gigs of RAM. After I had the script working, I wanted to try it on a variety of hardware. I started running it on other computers to confirm my expectation, which was that this script would obviously work on all these other systems. That thinking was incorrect. On one system it would reliably fail. On another system it would sometimes fail. When I traced through the error output, I came across a clear statement on the nature of the failure.

build step: cxx "./obj/v8/torque_generated_definitions/js-iterator-helpers-tq.obj"
stderr:
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://crbug.com in the Tools>LLVM component, run tools/clang/scripts/process_crashreports.py (only if inside Google) to upload crash related files, and include the crash backtrace, preprocessed source, and associated run script.

The computer had run out of memory during the compilation. The compilation process runs many jobs (or threads) to perform the various steps of compilation in parallel. If you get jobs running, the system can exhaust its memory and memory allocations will fail. That’s what was happening on the other systems. The system with 16 gigs would sometimes fail. But if I restarted the build then it would usually be successful. The system with 8 gigs would always fail. To adjust for this, I can manually cap the number of threads allowed. Once I did this, I could get reliably get the script to compile successfully. In normal times I might use this as an opportunity to encourage others to upgrade their memory. When it comes to storage and RAM, my philosophy is “You don’t have enough until you have more than enough.” But in the last month or two several memory manufacturers have announced they will be emphasizing more profitable markets and withdrawing from consumer sales. Chances are that most of the people reading this don’t have the resources of a data center available and upgrading their memory just isn’t an option (unless they want to pay 200+% for memory). Accommodating for this, I’m setting a cap of 32 jobs for the compilation process. I think that will make the script successful for most. If you want to allow the compilation process to attempt to maximize the number of threads you can set the PARALLEL_JOBS variable in the script to 0. Yes, this will result in the compilation process being slower than maximum on well capable systems unless someone modifies the script. But I wanted this script to be more generally usable. Reliably was given more importance than performance.

Start, Sleep, Finish

The compilation process can take a long time. For v8, depending on your system, it can take an hour or more. For Chromium it can take much longer. This isn’t the type of compilation that that you could start, go get coffee, and expect it to be done when you get back. Rather, you could start it, go to bed, and wake up the next day having gotten plenty of rest only to find that the compilation process isn’t finished. The good news is that your first compilation will take this long, but subsequent ones could be faster, benefiting from the efforts of previous compilations. You’ll want to make sure that your computer doesn’t go to sleep during compilation. I’ve had this happen, even when I set the power policy for the computer to never go to sleep. I’m tempted to resurface a mouse-jiggler to keep the machine awake. Those devices tend to effective even when the computer is locked.

Given the massive amount of time this process can take, it is better if there is a specific machine designated to perform build tasks for Chromium and V8. You could do other work on a machine while compilation occurs. But you might find that your tasks compete with the build process.

How Long Did This Take?

Build times can have wide variance between systems of different performance characteristics. If you want to see how long the various steps of the build process took, the batch file is appending to a file named build_log.txt in the Google folder. You can view this file while the build is in process. But you will need to make sure you don’t lock the file. Some text editors lock a file when it is being viewed. The safest way to view the file is to open a command prompt and dump the contents of the file to the console (using the type command in the command prompt or the Get-Content command in PowerShell). You can review the output from it to see how any of the phases of the build process works.

What about Building V8 Only?

Previously I’ve shown how to check out the v8 code only to build it. I think I’m going to abandon that in favor of this approach, which can be used to build other project. The difference comes down to selecting a build target.


Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Bluesky: @j2i.net

Remote Access Hardware (PiKVM)

Remote Desktop tends to work well for me provided that the computer is turned on, booted up, and not locked up. If those conditions are not met, physical interaction is needed. There have been a few times when my computer is hibernating, but I realize I need to access. Today, I’m writing about one of the solutions that I’m using for this. I installed a KVM (Keyboard, Video, Mouse) into my computer. KVMs generally let you use a keyboard, mouse, and display with multiple computers. They are usually connected to a computer over a USB connector and an HDMI cable. But this solution is an IP based solution. Between the user and the target computer is a network connection.

What about Wake-On-LAN

If the problem is only ensuring that a computer is turned on, a sufficient solution may be to enable Wake-On-LAN on the computer. This is a setting that must be enabled through the BIOS/UEFI. Once enabled, a special signal broadcast over your network will result in the computer waking up if it is asleep or turning on when it is turned off. (Find information on building a Wake-On-LAN packet here) Where it doesn’t work is if the computer powered on, but did not boot up, such as when the BIOS is showing a notification and prompting for someone to press a key to continue, or when Windows Update is performing changes (or has failed). A hardware solution is unaffected by these conditions. There are many hardware solutions for KVMs. I decided on PiKVM.

What is PiKVM?

PiKVM is a KVM solution available with different sets of features and capabilities. The most basic PiKVM doesn’t have video capabilities, but interfaces with the power and reset buttons on a computer (PiKVM version 1). With the PiKVM v2 the device is also able to emulate a USB drive to present files to the computer. The next step up, v3, has HDMI video capture for 1920×1080 @ 25fps and has support for a mini-OLED display for showing the IP address. Version 4 supports 1920×1200 @ 60 FPS. There is an OS image for the PI specifically for PiKVM hardware. You can find the images at https://pikvm.org/download/.

About the Geekworm PiKVMs

The hardware that I’m using is the Geekworm PiKVM X651 . It is derived from the PiKVM v3. If you read about the general features of the PiKVM3 on pikvm.org, you will find some differences in what is listed there and what Geekworm offers in this model. The Geekworm X651 installs inside the computer. It is secured to one of the PCI covers, though it does not insert into a PCI slot. It also has a space for a WiFi antenna to be put on the card and be external to the PC. The PiKVM v3 hardware described on the website doesn’t install inside the computer, nor does it offer a solution for externalizing the antenna.

Antenna installed on Geekworm X650 PiKVM card

My Hardware Selection

After a bit of debate, I decided on the Geekworm X651. This is the hardware that I purchased.

If you want to make use of the drive-emulation features, you will want a setup that has more access to memory. Consider the following in place of the CM4 with storage.

If you would prefer to use an M.2 drive instead of an SD card, Geekworm also makes the X652.

Comparison with Remote Desktop

I’ve already mentioned the most significant difference between RDP and the PiKVM; The PiKVM provides some level of access even if the computer isn’t turned on or hasn’t booted up. There are differences beyond this. You may find that you want to use both the KVM and RDP in the same system. The PiKVM’s maximum resolution is 1920×1080 (for v3) or 1920×1200 (for v4). I’ve seen RPD work up to 5K in resolution. It may support higher resolutions, but I’ve not used a display that support higher. But I don’t have a display of a higher resolution for confirming. RDP also supports sharing resources such as drives and printers with a remote machine, making it easier to work as though the machine is there with you. I will likely continue to use RDP for general access, but fallback to the PiKVM when I need to wakeup my computer.

Installation and Setup Experience

Anyone that is comfortable with the PiCM4 would be comfortable setting up the Geekworm X651. A PiCM4 must be supplied for it to work. Most of the setup and configuration can be done outside of the computer in which it will be installed. The PiCM4 units are available with or without internal storage memory. For the units without internal memory, one will need a microSD card. It is recommended that the SD card be at least 32 gigs. Part of the card will be used for the OS image. Part of it will be used for providing data to the PC, such as presenting as a bootable drive when reinstalling an OS on the PC. That said, I’m using a Pi with internal memory and a capacity of 16 gigs. I don’t generally recommend this, but it was fine for me. Since I have a Pi with internal memory, to install the OS I had to use an included jumper with the card to short the BOOT jumper and the raspi_boot utility to have the CM4 present to my computer as a USB drive. I then used the Raspberry Pi Image Manager to write the image. For the X651, power will have to be provided via the USB-C port closest to the Ethernet jack or over the POE adapter to write the image. The USB-C port closest to the mini-HDMI input is the data port. Use this port for writing the the OS image. After the image is written, you are ready for setting your password for the device.

Setting the Passwords

You must change the default passwords on the device. Remove the jumper from the boot pins, connect it to your network cable to the device. If your network doesn’t support POE, then connect a power supply to the port next to the ethernet adapter. After the unit boots up, the tiny display will show the IP address (alternatively, use your router to discover the IP address). When you enter the IP address in the browser, you will be confronted with a login page. The default user name and password are admin and admin.

The default username and password

Once you are logged in, you have three options. Select the option to show the terminal.

The three options the KVM presents after logging in.

The default user ID and password here are both root. You’ll want to change that immediately. The device boots mounting the file system in read-only mode. You’ll need to access the super user privileges to remount the files system in read-write mode.

su -
rw

Now, change the password for the root account with the following command.

passwd root

You will be prompted to enter the password twice. Next, you will want to change the password for the web interface.

kvmd-htpasswd set admin

You will once again be prompted to enter the password twice. Once you’ve set the password, remount the file system in read-only. Then reboot.

rw
reboot

The software configuration is complete. You are now ready to install the KVM into your computer.

Installation into the Computer

Before installation, you will want to either consult the manual for your motherboard or examine the motherboard and figure out where various switches are connected. The jumpers that you want to select are as follows.

  • Power
  • Reset
  • Power LED
  • HD LED

For each of these jumpers, you’ll need to disconnect it from the motherboard to connect it to the associated input on the PiKVM. Then connect the associated jumper from the PiKVM to the motherboard. After you’ve connected all of them, you will still be able to operate the power and reset buttons as you did before. You will need to secure the PiKVM in the computer case. Before you do, you may want to test it. Connect the mini-HDMI to HDMI cable to your computers video card and the PiKVM. Ensure it has power either from a USB-C cable or from POE. Connect the PiKVM’s USB-C port closest to the mini-HDMI port to your computer. This connection is necessary for sending keyboard and mouse messages. Wait a few moments for the card to bootup and connect to it via its IP address. You should be able to control your computer over the KVM. Once you’ve confirmed that it works, you are ready to secure the PiKVM in the computer.

Some computers have a slot on the case that doesn’t actually align with any PCI ports. If you have one such slot, consider using it. The PiKVM won’t establish an electrical connection with the computer’s slot anyway. But I advise against having it next to the video card since those can give off a lot of heat. The PiKVM only secures in the case with the screw on the slow cover. Though this is sufficient, I admit that I am not a fan of the card having the ability to wiggle a bit since it is only secured along one edge.

Future Purchase Considerations

I’ve been pleased with the performance of this unit, and am considering purchasing another one. But I’ve got several computers on racks that could use this. Rather than purchase one for each computer, it might make sense to get a unit that can control multiple machiens. The Geekworm X680 controls up to 4 machines. Though I would need to also purchase interfaces for each computer to more seamlessly get access to the power and reset buttons on the motherboard.


Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Bluesky: @j2i.net