forked from OSchip/llvm-project
066b8f2fc6
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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Opts.td | ||
ResourceFileWriter.cpp | ||
ResourceFileWriter.h | ||
ResourceScriptCppFilter.cpp | ||
ResourceScriptCppFilter.h | ||
ResourceScriptParser.cpp | ||
ResourceScriptParser.h | ||
ResourceScriptStmt.cpp | ||
ResourceScriptStmt.h | ||
ResourceScriptToken.cpp | ||
ResourceScriptToken.h | ||
ResourceScriptTokenList.def | ||
ResourceVisitor.h | ||
llvm-rc.cpp |