When configuring with the following:
cmake -S "/home/david.spickett/llvm-project/llvm" -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libunwind" \ -DLLVM_USE_LINKER=lld \ -DRUNTIMES_armv8l-unknown-linux-gnueabihf_COMPILER_RT_BUILD_GWP_ASAN=OFF
Prior to this patch BUILD_GWP_ASAN was not passed down to compiler-rt.
If you configured in a different way you would go through runtime_register_target
which does have logic to convert RUNTIMES_<target>_<setting> into just
<setting> to be passed to the sub project normally.
builtin_register_target also does this so I've lifted the code from that
into a function and use that in builtin_register_target and runtime_default_target.
runtime_register_target also handles "name" and "target" being different,
so I have left that as is.
Depends on D139536