I've been going through this exercise of excluding a number of directories from my Time Machine backups because they often contain thousands of tiny files that are easily regenerated. This can really help speed Time Machine backups, especially first-time backups (which I find I have to do far too often).
It would be handy if swift build (and maybe SPM) could set the tmexclusion flags when they create some of these temporary directories.
I think that would be reasonable if you're interested in filing an issue or opening a PR. We could probably apply it at the same time as the created-by-build-system xattr on top-level build directories.
Which repo would that be? And if you want to point me to where the created-by-build-system xattr gets applied, I’d be happy to take a stab at implementing it and submitting a PR.