I saw in the *.cmdline files that when I build with clang, we get these defines: -DINCLUDE_SUFFIX_COMPILER=_gcc -DTARGET_COMPILER_gcc
I see now that -DTARGET_COMPILER_gcc was intentional HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE if test "x$TOOLCHAIN_TYPE" = xclang; then HOTSPOT_TOOLCHAIN_TYPE=gcc but it's very confusing and isn't used in too many places, so should be fixed.