button
button copied to clipboard
Add Windows support
In order to get Button barely working on Windows, only one thing needs to be done:
- [ ] Add a base task handler. This means running child processes with the ability to receive implicit dependencies over pipes.
In order to get Button fully working on Windows these things need to be done:
- [ ] Implement file watching using ReadDirectoryChangesW.
- [ ] Add a task tracer for generalized implicit dependency detection. Presumably, this would be done in the same way as MSBuild's Tracker.exe. That is, by hooking kernel32!CreateFileW in child processes. This will be the trickiest part in getting full Windows support.
Extra credit if this can also be done:
- [x] Add a helper utility for making MSVC's output deterministic. Google does this with Syzygy's zap_timestamp utility. Deterministic builds are useful for a number of reasons: pruning tasks, caching outputs, or knowing if two DLLs were built with the same source.
- This one is done! https://github.com/jasonwhite/ducible
FYI, https://github.com/droundy/bigbro has made a first attempt at doing this kind of tracking. I worked on it for a while, but ended up getting bogged down with testing on virtual machines. I believe I got hooking executables working, but am a bit hazy on precisely how far I got.
I didn't use ReadDirectoryChangesW, since it seems like the hooking approach makes this unneeded.
ReadDirectoryChangesW is like inotify. It's not used for dependency detection; it's just for being notified that a file has been modified so a build can be started automatically.
Ah, that makes sense.