So while we do build builtins, this is actually needed to run builtins tests: https://github.com/llvm/llvm-project/blob/ad7e12226f6b1ebf91511899016cdfb29aa8919e/compiler-rt/test/CMakeLists.txt#L59
When testing locally, there was actually a tsan test that wasn't working if -static-libgcc was here. I can try to reproduce it. I believe it had to do with static linking in an archive, but a particular object file in that archive wasn't getting linked in which changed some runtime logic and caused the test to fail.
Oh ok. Disregard my last explanation. So the test is compiler-rt/test/tsan/Linux/check_memcpy.c, and the actual reason it failed is because the test just checks to make sure calls to memcpy/memset are not used at all (since tsan should intercept them and replace them with its own functions/code).
The issue is that if we statically link in an uninstrumented libunwind, then the test will fail bc it will find memcpy/set calls in that libunwind code. Removing the -static-libgcc seems to instead opt for dynamically linking against libunwind.so, and not linking in any uninstrumented code.