The problem seems to be that the build system picks the already installed libllvmradeon9.2.0.so (from /usr/lib64) instead of the one that has just been built. A workaround is to uninstall mesa before compiling and installing the new version.