[PATCH] Fix missing -fno-rtti on `llvm-config --cxxflags` with CMake.

jfonseca at vmware.com jfonseca at vmware.com
Fri May 9 13:53:21 PDT 2014


Unforunately CMAKE_CXX_FLAGS is updated as a side effect of
add_llvm_tool() and llvm_process_sources() macros, therefore
add_llvm_tool() must be at the top so that -fno-rtti appears on
tools/llvm-config/BuildVariables.inc

Nevertheless this is brittle.  A better fix would be to modify
CMAKE_CXX_FLAGS globally, on the top CMakeLists.txt, instead of a hidden
side-effect.
---
 tools/llvm-config/CMakeLists.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-missing-fno-rtti-on-llvm-config-cxxflags-with-CM.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140509/b605f654/attachment.bin>


More information about the llvm-commits mailing list