My favorite assembler by far is FASM (the Flat Assembler). Generally, I don't do very much ASM work, but I prefer FASM because it makes it extremely simple to link the object files it generates with C/C++ projects simply using my C/C++ linker.
It's also very nice that is an extremely in-depth x86 (16 and 32 bit) and amd64 assembly guide, complete with an entire listing of instructions, included with it.
FASM isn't distributed for OS X, but a 'blank' assembled ELF32 object file is for Unix-like OS's. After a little work, and using Agner Fog's object converter, I managed to get this converted to the native Mach-O format of OS X, change its symbols to use underscores (since basically all C libraries require/expect this). After that, it was a simple matter to link the resulting object file, and get a working FASM executable.
The command to use objconv to convert and munge the object file is:
objconv -nu+ -fmacho fasm.o fasm.mo
I find it extremely curious that FASM is designed to use a standard library that does
not mangle its function names. Yes, C function names are mangled. To distinguish
them fron variables, they have a leading underscore. The -nu+ changes the symbols in
fasm.o to include leading underscores. Thank you, Agner.
After that, it is a simple matter to create the FASM executable:
clang -m32 -o fasm fasm.mo
This causes warning about making a position-dependant executable. I ignored them. Mostly
because I don't know how to fix them, and they don't seem to matter.
Any files created with it would have to be converted to Mach-O to be used with Clang/LLVM, but that's simple with objconv. And given that, if you get to that point, you just wrote a bunch of ASM and are linking it with a native C/C++ project, I doubt that adding a builder definition to your build scripts would be too complex to handle.
I've looked around, and I can't find any other place where this process is detailed, and I found lots of unanswered questions when DuckDuckGo'ing for 'Fasm for OS X'. So if I'm not the first to get this working, whoever else has done it isn't talking about it.
A copy of the OS X Fasm executable, along with the source, the intermediate files, and full instructions on how to build it yourself can be found at https://github.com/FlyingJester/fasm.