Skip to content

Commit

Permalink
Merge pull request #113 from RadeonOpenCompute/roc-1.7.0
Browse files Browse the repository at this point in the history
roc-1.7.0 updates
  • Loading branch information
kzhuravl authored Nov 7, 2017
2 parents d4f1d17 + 3bc51b3 commit 9a0a4eb
Show file tree
Hide file tree
Showing 2,475 changed files with 181,132 additions and 87,877 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ include(CPack)
# sure that we don't have any stray generated files lying around in the tree
# (which would end up getting picked up by header search, instead of the correct
# versions).
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
if( CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE )
message(FATAL_ERROR "In-source builds are not allowed.
CMake would overwrite the makefiles distributed with LLVM.
Please create a directory and run cmake from there, passing the path
Expand Down Expand Up @@ -435,6 +435,8 @@ endif( LLVM_USE_OPROFILE )

set(LLVM_USE_SANITIZER "" CACHE STRING
"Define the sanitizer used to build binaries and tests.")
set(LLVM_LIB_FUZZING_ENGINE "" CACHE PATH
"Path to fuzzing library for linking with fuzz targets")

option(LLVM_USE_SPLIT_DWARF
"Use -gsplit-dwarf when compiling llvm." OFF)
Expand Down Expand Up @@ -795,14 +797,14 @@ if(LLVM_USE_HOST_TOOLS)
include(CrossCompile)
endif(LLVM_USE_HOST_TOOLS)
if(LLVM_TARGET_IS_CROSSCOMPILE_HOST)
# Dummy use to avoid CMake Wraning: Manually-specified variables were not used
# Dummy use to avoid CMake Warning: Manually-specified variables were not used
# (this is a variable that CrossCompile sets on recursive invocations)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
# 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")
include_directories(SYSTEM "/usr/local/include")
link_directories("/usr/local/lib")
endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")

Expand Down Expand Up @@ -1010,3 +1012,4 @@ endif()
if (MSVC)
include(InstallRequiredSystemLibraries)
endif()

2 changes: 1 addition & 1 deletion CODE_OWNERS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ E: qcolombet@apple.com
D: Loop Strength Reduction, Register allocators

N: Simon Dardis
E: simon.dardis@imgtec.com
E: simon.dardis@mips.com
D: MIPS Backend (lib/Target/Mips/*)

N: Duncan P. N. Exon Smith
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_TESTERS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ T: ARM, AArch64
O: Linux

N: Simon Dardis
E: simon.dardis@imgtec.com
E: simon.dardis@mips.com
T: MIPS
O: Linux
7 changes: 5 additions & 2 deletions cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
set(HAVE_TERMINFO 0)
endif()

find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2)
set(LLVM_LIBXML2_ENABLED 0)
set(LIBXML2_FOUND 0)
if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH))
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)
Expand Down Expand Up @@ -267,8 +267,11 @@ endif()
check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
if( LLVM_USING_GLIBC )
add_definitions( -D_GNU_SOURCE )
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
endif()
# This check requires _GNU_SOURCE
check_symbol_exists(sched_getaffinity sched.h HAVE_SCHED_GETAFFINITY)
check_symbol_exists(CPU_COUNT sched.h HAVE_CPU_COUNT)
if(HAVE_LIBPTHREAD)
check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP)
check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP)
Expand Down
13 changes: 9 additions & 4 deletions cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ endfunction()
#
function(add_windows_version_resource_file OUT_VAR)
set(sources ${ARGN})
if (MSVC)
if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(resource_file ${LLVM_SOURCE_DIR}/resources/windows_version_resource.rc)
if(EXISTS ${resource_file})
set(sources ${sources} ${resource_file})
source_group("Resource Files" ${resource_file})
set(windows_resource_file ${resource_file} PARENT_SCOPE)
endif()
endif(MSVC)
endif(MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")

set(${OUT_VAR} ${sources} PARENT_SCOPE)
endfunction(add_windows_version_resource_file)
Expand Down Expand Up @@ -894,15 +894,20 @@ endmacro(add_llvm_utility name)

macro(add_llvm_fuzzer name)
cmake_parse_arguments(ARG "" "DUMMY_MAIN" "" ${ARGN})
if( LLVM_USE_SANITIZE_COVERAGE )
if( LLVM_LIB_FUZZING_ENGINE )
set(LLVM_OPTIONAL_SOURCES ${ARG_DUMMY_MAIN})
add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS})
target_link_libraries(${name} ${LLVM_LIB_FUZZING_ENGINE})
set_target_properties(${name} PROPERTIES FOLDER "Fuzzers")
elseif( LLVM_USE_SANITIZE_COVERAGE )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
set(LLVM_OPTIONAL_SOURCES ${ARG_DUMMY_MAIN})
add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS})
set_target_properties(${name} PROPERTIES FOLDER "Fuzzers")
elseif( ARG_DUMMY_MAIN )
add_llvm_executable(${name} ${ARG_DUMMY_MAIN} ${ARG_UNPARSED_ARGUMENTS})
set_target_properties(${name} PROPERTIES FOLDER "Fuzzers")
endif()
endif()
endmacro()

macro(add_llvm_target target_name)
Expand Down
Loading

0 comments on commit 9a0a4eb

Please sign in to comment.