Here is my best attempt to articulate why I believe all dependencies, including compiler toolchains, belong in version control.

https://www.forrestthewoods.com/blog/dependencies-belong-in-version-control/

Dependencies Belong in Version Control

Why dependencies should be checked into version control.

@forrestthewoods
I largely agree. I go so far as to check in generated code, because it both saves other people time, and it reduces opportunities for skew (and unexpected diffs show where there's a problem!)

You'll need the system image too with all the system libraries. At some point, is better to archive the entire disk. Use a well defined VM (or container) for building, so it's reproducible forever!

@StompyRobot @forrestthewoods
re:
> You'll need the system image too with all the system libraries.

note, this will not work on macOS on Big Sur or later, because:

> New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem.
[...]

@StompyRobot @forrestthewoods
[cont'd]
> Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

source:
https://web.archive.org/web/20200902041407/https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes/

Apple Developer Documentation

@StompyRobot @forrestthewoods presumably it's the same on other apple platforms (iOS, etc)
@StompyRobot @forrestthewoods but also... would this really work on Windows? It would depend on a kernel that exposes a stable syscall interface (which e.g. linux has, but macOS definitely does NOT, and i don't know what the deal is on Windows)

@JamesWidman @StompyRobot @forrestthewoods You should be able to run Windows 95 applications on Windows 11 without too many problems. If you are running 32 bit, you should be able to run Windows 3.x applications. Windows 2.0 compatibility was dropped in 95, I think. Or maybe it was when the kernel switched to NT?

Aside from some early low-level Direct-something interfaces, the Microsoft kernels are pretty good at maintaining backwards compatibility.

@wolfpld
> You should be able to run Windows 95 applications on Windows 11

sure; but from my (mis-)reading of StompyRobot's post above, i was thinking of a scenario where all of the DLLs in C:\WINDOWS\SYSTEM32 are also committed to version control.

iow you'd be running that win95 exe on win11, but you'd also be using win95's version of (for example) KERNEL32.DLL. (This is why i mentioned the syscall interface.)

@wolfpld
fortunately, i misread StompyRobot's post, which was about running the entire build in a VM (which, to continue your example, would be a win95 VM). But i feel like that's maybe going a bit overboard.
@JamesWidman Well, you know, at some point you might want to just image your drive and use it in VM 20 years from now.
@JamesWidman @StompyRobot @forrestthewoods XCode is crap because it is tightly tied to OS releases, and anyway, Apple requires you to use only the latest available version if you want to submit your applications to their store.