Set target platform identification variables like `APPLE` and `LINUX` as soon as the target system is identified. This makes them available during toolchain and binutils selection. Fixes: #23333
Make `CMAKE_LIBRARY_ARCHITECTURE_REGEX` available while determining compilers before `Platform/Linux` is loaded.