mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
4a1d40cba0
When llvm-rc invokes clang for preprocessing, it uses a target triple derived from the default target. The test verifies that e.g. _WIN32 is defined when preprocessing. If running clang with e.g. -target ppc64le-windows-msvc, that particular arch/OS combination isn't hooked up, so _WIN32 doesn't get defined in that configuration. Therefore, the preprocessing test fails. Instead make llvm-rc inspect the architecture of the default target. If it's one of the known supported architectures, use it as such, otherwise set a default one (x86_64). (Clang can run preprocessing with an x86_64 target triple, even if the x86 backend isn't enabled.) Also remove superfluous llvm:: specifications on enums in llvm-rc.cpp.