X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=CMakeLists.txt;h=cfbf9562f0385d51a35c6cc6c857cf6d14c408c5;hp=fe177259f0aee3bd64b55aaf86723f2a7ceca3a4;hb=3af5418aa47909c6d09ffce82f34a84375fe6ede;hpb=24a6fb0a17caf9b5137027e41751fc7e82c7e3f0 diff --git a/CMakeLists.txt b/CMakeLists.txt index fe177259f0a..cfbf9562f03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,6 +350,11 @@ if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT) set(DISABLE_LLVM_DYLIB_ATEXIT 1) endif() +option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF) +if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS)) + set(LLVM_USE_HOST_TOOLS 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 @@ -536,9 +541,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) # when crosscompiling import the executable targets from a file -if(CMAKE_CROSSCOMPILING) +if(LLVM_USE_HOST_TOOLS) include(CrossCompile) -endif(CMAKE_CROSSCOMPILING) +endif(LLVM_USE_HOST_TOOLS) if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM