Page MenuHomePhabricator

Building XHPAST On Windows
Updated 2,626 Days AgoPublic

The libphutil repository does not ship a Windows binary for XHPAST by default. This can make it difficult to write and maintain Arcanist extensions for Windows.

This document provides information on how to set up your environment to build XHPAST on Windows

Install msysGit

You'll need to install the msysGit environment so that you have a Bash shell available. The easiest way to download and install Git from

Install MINGW32

Download MINGW32 from and install it. Once the main install has finished, it'll prompt you for the packages to install. You'll want to install these packages and then hit "Apply Changes":

pasted_file (276×942 px, 33 KB)

mingw32-base, mingw32-gcc-g++ and msys-base is what you want to install.

Configure your PATH

You will need to add Git and MINGW32 to your PATH like this:

pasted_file (607×1 px, 79 KB)

(Git is in the system PATH so it's not shown in that list, but it does need to be there)

Compile XHPAST

The provided scripts won't work on Windows, because Make is called mingw32-make. Open up Git Bash and then run (modify the path to libphutil as needed):

$ "mingw32-make" -C "C:\Tools\Arcanist\libphutil\support\xhpast" "SKIP_PARSER=1" "SKIP_SCANNER=1" "clean" "all" "install"

After this, arc liberate should work as intended.

Referenced Files
F1064854: pasted_file
Jan 19 2016, 11:50 PM
F1064856: pasted_file
Jan 19 2016, 11:50 PM
Last Author
Last Edited
Jan 19 2016, 11:50 PM

Event Timeline

hach-que edited the content of this document. (Show Details)