llvm-rc: CMAKE_RC_FLAGS are passed to the preprocessor, not to the resource compiler
Background information
Since llvm-rc
doesn't preprocess the input, cmake
performs an additional preprocessing step while building .rc
files in Windows. It runs the compiler with -E
command line option, dumps the output into an intermediate file, and then invokes llvm-rc
. The procedure is governed by __enable_llvm_rc_preprocessing
macro in Windows-Clang.cmake
and by cmcmd::RunLLVMRC
in cmcmd.cxx
.
The bug
If you specify CMAKE_RC_FLAGS
, these flags will be passed to the preprocessor, not to llvm-rc
.
Edited by Dax Koci