Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -330,6 +330,11 @@ set(DISABLE_LLVM_DYLIB_ATEXIT 1) endif() +option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF) +if(LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS) + set(CMAKE_CROSSCOMPILING ON) +endif() + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run