I could write a long, step-by-step post on how to build AOSP on OSX 10.10 but that would be unnecessary since the steps provided by the AOSP (see this page) are correct and adequate.
What did trip me up is knowing how to switch versions of xcode. Android 5 will only build using GCC which Apple stopped shipping with xcode back in version 4. Assuming you are using a more modern version of xcode, you’ll need to browse to Apple’s developer center and download version 4.5.2. I saved this download to /Applications but named it "Xcode_4.5.2.app" (don’t use spaces in the name or path. AOSP’s build system can’t handle that). Now all you have to do is:
sudo xcode-select -s /Applications/Xcode_4.5.2.app/Contents/Developer/
… and you should be ready to build Lollipop. Using the aforementioned instructions and xcode 4.5.2 I was able to successfully build a shamu (Nexus 6) on my Macbook Pro running OSx 10.10.2.
Don’t forget to switch back when you’re done building:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/