1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
Alexey Bader ae75421161 New tag for ittapi - fix an error related to cross-compiling ITTAPI in LLVM with mingw
Fix was implemented in the ittap repo to solve an error about cross-compiling ITTAPI in LLVM with mingw.
The problem occurred in the cross-compilation environment for Julia's dependencies.
The corresponding issue item in ittapi repo: https://github.com/intel/ittapi/issues/19
A new tag was created in ittapi repo for that fix.

This patch contains changes to update the ittapi tag in LLVM.

Reviewed By: bader

Differential Revision: https://reviews.llvm.org/D102471
2021-05-14 08:18:49 +03:00

57 lines
1.6 KiB
CMake

include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
if(NOT DEFINED ITTAPI_GIT_REPOSITORY)
set(ITTAPI_GIT_REPOSITORY https://github.com/intel/ittapi.git)
endif()
if(NOT DEFINED ITTAPI_GIT_TAG)
set(ITTAPI_GIT_TAG v3.18.12)
endif()
if(NOT DEFINED ITTAPI_SOURCE_DIR)
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
endif()
if(NOT EXISTS ${ITTAPI_SOURCE_DIR}/ittapi)
execute_process(COMMAND ${GIT_EXECUTABLE} clone ${ITTAPI_GIT_REPOSITORY}
WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR}
RESULT_VARIABLE GIT_CLONE_RESULT)
if(NOT GIT_CLONE_RESULT EQUAL "0")
message(FATAL_ERROR "git clone ${ITTAPI_GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT}, please clone ${ITTAPI_GIT_REPOSITORY}")
endif()
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${ITTAPI_GIT_TAG}
WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR}/ittapi
RESULT_VARIABLE GIT_CHECKOUT_RESULT)
if(NOT GIT_CHECKOUT_RESULT EQUAL "0")
message(FATAL_ERROR "git checkout ${ITTAPI_GIT_TAG} failed with ${GIT_CHECKOUT_RESULT}, please checkout ${ITTAPI_GIT_TAG} at ${ITTAPI_SOURCE_DIR}/ittapi")
endif()
include_directories( ${ITTAPI_SOURCE_DIR}/ittapi/include/ )
if( HAVE_LIBDL )
set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS})
endif()
set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})
add_llvm_component_library(LLVMIntelJITEvents
IntelJITEventListener.cpp
jitprofiling.c
${ITTAPI_SOURCE_DIR}/ittapi/src/ittnotify/ittnotify_static.c
LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
LINK_COMPONENTS
CodeGen
Core
DebugInfoDWARF
Support
Object
ExecutionEngine
)
add_dependencies(LLVMIntelJITEvents LLVMCodeGen)