Skip to content
Permalink
Browse files

merged with LLVM 321000

  • Loading branch information...
yrnkrn committed Jul 18, 2018
1 parent 77597a9 commit 0b9ac4188ff8b33fa358cc7931e40ce63b5ecce3
Showing 5,523 changed files with 387,510 additions and 160,044 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -0,0 +1,12 @@
# binary files
test/Object/Inputs/*.a-* binary
test/tools/dsymutil/Inputs/* binary
test/tools/llvm-ar/Inputs/*.lib binary
test/tools/llvm-objdump/Inputs/*.a binary
test/tools/llvm-rc/Inputs/* binary
test/tools/llvm-strings/Inputs/numbers binary
test/MC/AsmParser/incbin_abcd binary
test/YAMLParser/spec-09-02.test binary

# Windows line ending test
test/MC/AsmParser/preserve-comments-crlf.s text eol=crlf
@@ -110,7 +110,7 @@ endif()
# LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
# This allows an easy way of setting up a build directory for llvm and another
# one for llvm+clang+... using the same sources.
set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;debuginfo-tests;lld;polly")
set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly;debuginfo-tests")
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
@@ -167,6 +167,10 @@ if(LLVM_DEPENDENCY_DEBUGGING)
endif()

option(LLVM_ENABLE_DAGISEL_COV "Debug: Prints tablegen patterns that were used for selecting" OFF)
option(LLVM_ENABLE_GISEL_COV "Enable collection of GlobalISel rule coverage" OFF)
if(LLVM_ENABLE_GISEL_COV)
set(LLVM_GISEL_COV_PREFIX "${CMAKE_BINARY_DIR}/gisel-coverage-" CACHE STRING "Provide a filename prefix to collect the GlobalISel rule coverage")
endif()

# Add path for custom modules
set(CMAKE_MODULE_PATH
@@ -347,7 +351,7 @@ set(LLVM_TARGET_ARCH "host"

option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)

option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if available. Can be ON, OFF, or FORCE_ON")

option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)

@@ -381,18 +385,14 @@ option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)

option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
option(LLVM_ENABLE_DUMP "Enable dump functions even when assertions are disabled" OFF)

if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
else()
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
endif()

if( LLVM_ENABLE_ASSERTIONS )
set(LLVM_ENABLE_DUMP ON)
endif()

option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)

set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
@@ -881,18 +881,13 @@ if( LLVM_INCLUDE_EXAMPLES )
endif()

if( LLVM_INCLUDE_TESTS )
if(TARGET clang)
if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
include(LLVMExternalProjectUtils)
if (EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite)
llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
USE_TOOLCHAIN
TOOLCHAIN_TOOLS clang lld clang-cl
EXCLUDE_FROM_ALL
NO_INSTALL
ALWAYS_CLEAN)
endif()

add_llvm_external_project(debuginfo-tests projects/debuginfo-tests)
llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
USE_TOOLCHAIN
EXCLUDE_FROM_ALL
NO_INSTALL
ALWAYS_CLEAN)
endif()
add_subdirectory(utils/lit)
add_subdirectory(test)
@@ -976,11 +971,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
set_target_properties(llvm-headers PROPERTIES FOLDER "Misc")

if (NOT CMAKE_CONFIGURATION_TYPES)
add_custom_target(install-llvm-headers
DEPENDS llvm-headers
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=llvm-headers
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
add_llvm_install_targets(install-llvm-headers
COMPONENT llvm-headers)
endif()
endif()

@@ -993,6 +985,7 @@ if(LLVM_DISTRIBUTION_COMPONENTS)

add_custom_target(distribution)
add_custom_target(install-distribution)
add_custom_target(install-distribution-stripped)
foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
if(TARGET ${target})
add_dependencies(distribution ${target})
@@ -1005,11 +998,19 @@ if(LLVM_DISTRIBUTION_COMPONENTS)
else()
message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install target")
endif()

if(TARGET install-${target}-stripped)
add_dependencies(install-distribution-stripped install-${target}-stripped)
else()
message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install-stripped target."
" Its installation target creation should be changed to use add_llvm_install_targets,"
" or you should manually create the 'install-${target}-stripped' target.")
endif()
endforeach()
endif()

# This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
if (MSVC)
if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
include(InstallRequiredSystemLibraries)
endif()

@@ -106,4 +106,4 @@ Additional zapcc-only code in

### When was the source last merged with LLVM trunk?

This open-source release was last merged with LLVM 318000 on 2017-11-12.
This open-source release was last merged with LLVM 321000 on 2017-12-18.
@@ -127,49 +127,63 @@ if(HAVE_LIBPTHREAD)
set(LLVM_PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
endif()

# Don't look for these libraries on Windows. Also don't look for them if we're
# using MSan, since uninstrumented third party code may call MSan interceptors
# like strlen, leading to false positives.
if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
if (LLVM_ENABLE_ZLIB)
check_library_exists(z compress2 "" HAVE_LIBZ)
else()
set(HAVE_LIBZ 0)
endif()
# Skip libedit if using ASan as it contains memory leaks.
if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
check_library_exists(edit el_init "" HAVE_LIBEDIT)
else()
set(HAVE_LIBEDIT 0)
endif()
if(LLVM_ENABLE_TERMINFO)
set(HAVE_TERMINFO 0)
foreach(library tinfo terminfo curses ncurses ncursesw)
# Don't look for these libraries if we're using MSan, since uninstrumented third
# party code may call MSan interceptors like strlen, leading to false positives.
if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
set(HAVE_LIBZ 0)
if(LLVM_ENABLE_ZLIB)
foreach(library z zlib_static zlib)
string(TOUPPER ${library} library_suffix)
check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
if(HAVE_TERMINFO_${library_suffix})
set(HAVE_TERMINFO 1)
set(TERMINFO_LIBS "${library}")
check_library_exists(${library} compress2 "" HAVE_LIBZ_${library_suffix})
if(HAVE_LIBZ_${library_suffix})
set(HAVE_LIBZ 1)
set(ZLIB_LIBRARIES "${library}")
break()
endif()
endforeach()
else()
set(HAVE_TERMINFO 0)
endif()

find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
set(LLVM_LIBXML2_ENABLED 0)
set(LIBXML2_FOUND 0)
if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
find_package(LibXml2)
if (LIBXML2_FOUND)
set(LLVM_LIBXML2_ENABLED 1)
include_directories(${LIBXML2_INCLUDE_DIR})
set(LIBXML2_LIBS "xml2")
# Don't look for these libraries on Windows.
if (NOT PURE_WINDOWS)
# Skip libedit if using ASan as it contains memory leaks.
if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
check_library_exists(edit el_init "" HAVE_LIBEDIT)
else()
set(HAVE_LIBEDIT 0)
endif()
if(LLVM_ENABLE_TERMINFO)
set(HAVE_TERMINFO 0)
foreach(library tinfo terminfo curses ncurses ncursesw)
string(TOUPPER ${library} library_suffix)
check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
if(HAVE_TERMINFO_${library_suffix})
set(HAVE_TERMINFO 1)
set(TERMINFO_LIBS "${library}")
break()
endif()
endforeach()
else()
set(HAVE_TERMINFO 0)
endif()

find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
set(LLVM_LIBXML2_ENABLED 0)
set(LIBXML2_FOUND 0)
if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
find_package(LibXml2)
if (LIBXML2_FOUND)
set(LLVM_LIBXML2_ENABLED 1)
include_directories(${LIBXML2_INCLUDE_DIR})
set(LIBXML2_LIBS "xml2")
endif()
endif()
endif()
endif()

if (LLVM_ENABLE_LIBXML2 STREQUAL "FORCE_ON" AND NOT LLVM_LIBXML2_ENABLED)
message(FATAL_ERROR "Failed to congifure libxml2")
endif()

check_library_exists(xar xar_open "" HAVE_LIBXAR)
if(HAVE_LIBXAR)
set(XAR_LIB xar)
@@ -624,3 +638,34 @@ else()
endif()

string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}")

function(find_python_module module)
string(TOUPPER ${module} module_upper)
set(FOUND_VAR PY_${module_upper}_FOUND)

execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import ${module}"
RESULT_VARIABLE status
ERROR_QUIET)

if(status)
set(${FOUND_VAR} 0 PARENT_SCOPE)
message(STATUS "Could NOT find Python module ${module}")
else()
set(${FOUND_VAR} 1 PARENT_SCOPE)
message(STATUS "Found Python module ${module}")
endif()
endfunction()

set (PYTHON_MODULES
pygments
yaml
)
foreach(module ${PYTHON_MODULES})
find_python_module(${module})
endforeach()

if(PY_PYGMENTS_FOUND AND PY_YAML_FOUND)
set (LLVM_HAVE_OPT_VIEWER_MODULES 1)
else()
set (LLVM_HAVE_OPT_VIEWER_MODULES 0)
endif()

0 comments on commit 0b9ac41

Please sign in to comment.
You can’t perform that action at this time.