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

Jose Fonseca jfonseca at vmware.com
Fri May 9 14:07:43 PDT 2014


Sorry.  I just realized this was against LLVM 3.3 tree and not top of tree.

Anyway, AFAICT, the problem is there with LLVM 3.4 and TOT. And the fix should be similar.

Jose

----- Original Message -----
> 
> 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(-)
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> https://urldefense.proofpoint.com/v1/url?u=http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=Cfcd5Zf9ZLh1On5u%2BclUC1a17Ki5n6zw2hBJ4Iiaoyg%3D%0A&s=9a0acf2b106e00a61b708039ff1c3ac039d7baf64e93a369e72022ce02768630
> 



More information about the llvm-commits mailing list