X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=CMakeLists.txt;h=d15a54b9e7661807a6fbab21e4004d4abef8f69e;hb=c0f15f67038ef3967c2c728d050ad6da0c098f10;hp=228732d6a7168fe78430a268ede9c19f5636774e;hpb=537d9a7768a2a541b11b980184196fa453c37c6f;p=oota-llvm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 228732d6a71..d15a54b9e76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,7 @@ set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) set(LLVM_ALL_TARGETS + AArch64 ARM CppBackend Hexagon @@ -90,13 +91,8 @@ set(LLVM_ALL_TARGETS # List of targets with JIT support: set(LLVM_TARGETS_WITH_JIT X86 PowerPC ARM Mips) -if( MSVC ) - set(LLVM_TARGETS_TO_BUILD X86 - CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") -else( MSVC ) - set(LLVM_TARGETS_TO_BUILD "all" +set(LLVM_TARGETS_TO_BUILD "all" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") -endif( MSVC ) set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "" CACHE STRING "Semicolon-separated list of experimental targets to build.") @@ -128,6 +124,8 @@ set(LLVM_TARGET_ARCH "host" option(LLVM_ENABLE_THREADS "Use threads if available." ON) +option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON) + if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) endif() @@ -185,13 +183,16 @@ endif( LLVM_USE_INTEL_JITEVENTS ) option(LLVM_USE_OPROFILE "Use opagent JIT interface to inform OProfile about JIT code" OFF) -# If enabled, ierify we are on a platform that supports oprofile. +# If enabled, verify we are on a platform that supports oprofile. if( LLVM_USE_OPROFILE ) if( NOT CMAKE_SYSTEM_NAME MATCHES "Linux" ) message(FATAL_ERROR "OProfile support is available on Linux only.") endif( NOT CMAKE_SYSTEM_NAME MATCHES "Linux" ) endif( LLVM_USE_OPROFILE ) +set(LLVM_USE_SANITIZER "" CACHE STRING + "Define the sanitizer used to build binaries and tests.") + # Define an option controlling whether we should build for 32-bit on 64-bit # platforms, where supported. if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) @@ -242,8 +243,7 @@ include(config-ix) # invocation time. set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING "Default target for which LLVM will generate code." ) -set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE STRING - "Default target for which LLVM will generate code." ) +set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") include(HandleLLVMOptions) @@ -376,10 +376,21 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) +if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM + # with libxml2, iconv.h, etc., we must add /usr/local paths. + include_directories("/usr/local/include") + link_directories("/usr/local/lib") +endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) +# Make sure we don't get -rdynamic in every binary. For those that need it, +# use set_target_properties(target PROPERTIES ENABLE_EXPORTS 1) +set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") + include(AddLLVM) include(TableGen) @@ -405,8 +416,6 @@ add_subdirectory(utils/count) add_subdirectory(utils/not) add_subdirectory(utils/llvm-lit) add_subdirectory(utils/yaml-bench) -add_subdirectory(utils/obj2yaml) -add_subdirectory(utils/yaml2obj) add_subdirectory(projects) @@ -427,7 +436,7 @@ if( LLVM_INCLUDE_TESTS ) add_subdirectory(utils/unittest) add_subdirectory(unittests) if (MSVC) - # This utility is used to prevent chrashing tests from calling Dr. Watson on + # This utility is used to prevent crashing tests from calling Dr. Watson on # Windows. add_subdirectory(utils/KillTheDoctor) endif()