Compiling llvm with cmake-3.6.0 fails due to "-isysroot -other-option". After a warning about -other-option file not found, the compiler can't find the appropriate includes, hence breaks. 3.5.2 didn't have this problem, something changed here, which needs checking/fixing.
Seems unrelated to cmake version afterall: /Users/fabian/Gentoo-10.11/usr/bin/x86_64-apple-darwin15-clang -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I/Users/fabian/Gentoo-10.11/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/builtins -Iinclude -I/Users/fabian/Gentoo-10.11/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/include -DNDEBUG -arch i386 -isysroot -mmacosx-version-min=10.5 -arch i386 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -MMD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o -c /Users/fabian/Gentoo-10.11/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/builtins/eprintf.c x86_64-apple-darwin15-clang-3.7: warning: no such sysroot directory: '-mmacosx-version-min=10.5' /Users/fabian/Gentoo-10.11/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/builtins/eprintf.c:14:10: fatal error: 'stdio.h' file not found #include <stdio.h> ^ 1 error generated.
I fixed this a week or so ago