Created attachment 460746 [details] build log xz-compressed mesa doesn't compile with llvm-4.0.0_rc1 : unknown type name 'LLVMAttribute' implicit declaration of function 'LLVMAddAttribute' 'LLVMNoAliasAttribute' undeclared etc.
I'l' just let you know that the GIT version of mesa (mesa-9999) does build just fine with llvm-4.0.0_rc1.
I've asked on the upstream mailing list.
It seems doubtful that mesa-13 will support llvm-4. I have added mesa-17.0.0_rc2 to the tree, which should support llvm-4 though. I'm going to mark as WONTFIX. I'll let you know if something changes with the 13 series.