ITerm unresponsive as xcode attempts (and fails) compiling every startup

bashitermxcodezsh

Very recently, iTerm has become unresponsive for me when I open new instances of it. Whenever I open a new window or tab of iTerm, Xcode seems to be attempting to recompile a slightly older version of the operating system on boot. I believe this because if I open another terminal and cancel whatever is causing the window to hang, and run ps, I see the following:

 1117 ttys000    0:00.01 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as
 1118 ttys000    0:00.22 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x assembler - -o a.out -integrated-as -c
 1121 ttys000    0:00.01 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1as -triple x86_64-apple-macosx10.15.0 -filetype obj -main-file-name - -target-cpu penryn -fdebug-compilation-dir /Users/me -dwarf-debug-producer Apple clang version 11.0.3 (clang-1103.0.32.59) -dwarf-version=4 -mrelocation-model pic -o a.out -

This is concerning, because:

  1. I'm on catalina (10.15.4), so it doesn't seem like Xcode should be doing anything with 10.15.0
  2. I did not accept any system prompt asking me to update. I've also run Xcode to see if I should install anything that may be out of date and it seems happy enough, so there shouldn't be anything there.
  3. It hangs indefinitely and does not ever finish. It's preventing my shell from loading (zsh) which is annoying.

Has anyone run into this or have ideas about what's going on?

Best Answer

It turns out I added a small typo in my .zshrc of as that was attempting to translate assembly code to object code every time I started a new shell and the .zshrc file was evaluated. Oof.