We would like to default to a particular CPU when -mcpu is not provided on the Clang command line. This introduces a CMake variable CLANG_AARCH64_DEFAULT_CPU, so that a default CPU can be specified at CMake build time.
If CLANG_AARCH64_DEFAULT_CPU is not provided, it will default to "generic", so this will make sure we keep the current behaviour.
If CLANG_AARCH64_DEFAULT_CPU is changed, a companion downstream patch is required at the moment for the tests that check "target-cpu generic" when -mcpu is omitted. Ideally we could somehow parameterize that with something like "target-cpu ${CLANG_AARCH64_DEFAULT_CPU}" in the tests. Maybe that is possible in Lit, in the config files, but I don't know and am still looking into that.
No need for if(NOT... for cache variables.