Fast Build on Windows for WLS2
This is a quick post y'all! less than 2m read!
Background
I have been struggling compiling on windows with incremental builds & they take forever. After doing lots of Googling I stumbled across the post from markentier.tech
. After doing some testing my compile times on a large project for Valheim went from 3-5 minutes to 30 seconds. Back to those beautiful compile times like on my Linux dual boot!
Setup
- Install
make
andrsync
- Copy the following
Makefile
into your repo - Run
make wsl.build
Conclusion
This moves your files into a temp directory on your Linux sub-system which allows it to compile directly without the jank of cross system. After compilation it rsyncs
only the outputs needed to your target directory if you are using it docker builds or other.
Top comments (0)