Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Rebase [ittapi] Check out branch only if ITTAPI is cloned' #37

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
if(NOT DEFINED ITTAPI_SOURCE_DIR)
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}/ittapi)
endif()
include_directories( ${ITTAPI_SOURCE_DIR}/ittapi/include/ )
include_directories( ${ITTAPI_SOURCE_DIR}/include/ )
add_llvm_component_library(LLVMIntelJITEvents
IntelJITEventListener.cpp

Expand Down
30 changes: 16 additions & 14 deletions llvm/lib/ExecutionEngine/IntelJITProfiling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,28 @@ if(NOT DEFINED ITTAPI_GIT_TAG)
endif()

if(NOT DEFINED ITTAPI_SOURCE_DIR)
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}/ittapi)
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 EXISTS "${ITTAPI_SOURCE_DIR}")
execute_process(
COMMAND "${GIT_EXECUTABLE}" clone "${ITTAPI_GIT_REPOSITORY}" "${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}")
message(FATAL_ERROR "git clone ${ITTAPI_GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT}, please clone ${ITTAPI_GIT_REPOSITORY} manually")
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")
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${ITTAPI_SOURCE_DIR}" checkout "${ITTAPI_GIT_TAG}"
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} manually")
endif()
endif()

include_directories( ${ITTAPI_SOURCE_DIR}/ittapi/include/ )
include_directories( ${ITTAPI_SOURCE_DIR}/include/ )

if( HAVE_LIBDL )
set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS})
Expand All @@ -39,7 +41,7 @@ set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})

add_llvm_component_library(LLVMIntelJITProfiling
jitprofiling.c
${ITTAPI_SOURCE_DIR}/ittapi/src/ittnotify/ittnotify_static.c
${ITTAPI_SOURCE_DIR}/src/ittnotify/ittnotify_static.c

LINK_LIBS ${LLVM_INTEL_JIT_LIBS}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ if( LLVM_USE_INTEL_JITEVENTS )
set(intel_jit_profiling IntelJITProfiling)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../IntelJITProfiling)
if(NOT DEFINED ITTAPI_SOURCE_DIR)
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}/ittapi)
endif()
include_directories(${ITTAPI_SOURCE_DIR}/ittapi/include/ )
include_directories(${ITTAPI_SOURCE_DIR}/include/ )
endif()

add_llvm_component_library(LLVMOrcTargetProcess
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/ExecutionEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ add_mlir_library(MLIRExecutionEngine
MLIRTargetLLVMIRExport
)

if(LLVM_BUILD_LLVM_DYLIB)
if(LLVM_BUILD_LLVM_DYLIB AND NOT (WIN32 OR MINGW OR CYGWIN)) # Does not build on windows currently, see #106859
# Build a shared library for the execution engine. Some downstream projects
# use this library to build their own CPU runners while preserving dynamic
# linkage.
Expand Down