LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is set in llvm/CMakeLists.txt
and in llvm/runtimes/CMakeLists.txt.
This meant that anything you passed down, or any platform not using
this layout yet would have it enabled despite it being OFF earlier.
To fix this, check if we have already defined the variable
and if so, use that value.
bultin_register_target I don't fully understand the purpose of.
So for now I have left it setting the value to ON. The rest will
respect what was previously set.
I don't know why the _default variable was used here, I don't think it matters too much.
With this change, if you add -DLLVM_ENABLE_PER... to your cmake command line, it will be passed down to this function as expected.