From 90833ebc25585947a9f9e1e058a334ec2cac471f Mon Sep 17 00:00:00 2001 From: Zentrik Date: Wed, 9 Oct 2024 20:47:04 +0100 Subject: [PATCH] Drop ittapi patch for LLMV >= 19 --- deps/llvm.mk | 4 +- deps/patches/llvm19-ittapi-cmake.patch | 77 -------------------------- 2 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 deps/patches/llvm19-ittapi-cmake.patch diff --git a/deps/llvm.mk b/deps/llvm.mk index 47de119a69f8c..09dd4f187d611 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -234,9 +234,7 @@ $$(LLVM_BUILDDIR_withtype)/build-compiled: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patc LLVM_PATCH_PREV := $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied endef -ifeq ($(shell test $(LLVM_VER_MAJ) -ge 19 && echo true),true) -$(eval $(call LLVM_PATCH,llvm19-ittapi-cmake)) -else +ifeq ($(shell test $(LLVM_VER_MAJ) -lt 19 && echo true),true) $(eval $(call LLVM_PATCH,llvm-ittapi-cmake)) endif diff --git a/deps/patches/llvm19-ittapi-cmake.patch b/deps/patches/llvm19-ittapi-cmake.patch deleted file mode 100644 index c4ce2cf569b22..0000000000000 --- a/deps/patches/llvm19-ittapi-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/lib/ExecutionEngine/IntelJITProfiling/CMakeLists.txt b/lib/ExecutionEngine/IntelJITProfiling/CMakeLists.txt -index 0c5017c359d6..92777133e9de 100644 ---- a/lib/ExecutionEngine/IntelJITProfiling/CMakeLists.txt -+++ b/lib/ExecutionEngine/IntelJITProfiling/CMakeLists.txt -@@ -12,23 +12,23 @@ 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} -+if(NOT EXISTS ${ITTAPI_SOURCE_DIR}) -+ execute_process(COMMAND ${GIT_EXECUTABLE} clone ${ITTAPI_GIT_REPOSITORY} ${ITTAPI_SOURCE_DIR} -+ 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") -+ execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${ITTAPI_GIT_TAG} -+ WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR} -+ 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}") -+ 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}) -@@ -40,7 +40,7 @@ set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS}) - add_llvm_component_library(IntelJITProfiling - IntelJITEventListener.cpp - 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} - -diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt -index b4fd04d65e26..56c529c08937 100644 ---- a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt -+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt -@@ -1,5 +1,8 @@ - include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) --include_directories( ${PROJECT_BINARY_DIR}/ittapi/include/ ) -+if(NOT DEFINED ITTAPI_SOURCE_DIR) -+ set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}) -+endif() -+include_directories( ${ITTAPI_SOURCE_DIR}/include/ ) - add_llvm_component_library(LLVMIntelJITEvents - IntelJITEventListener.cpp - -diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt -index 3d1dfe758c79..03677d610cbb 100644 ---- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt -+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt -@@ -6,7 +6,10 @@ set(intel_jit_profiling ) - if( LLVM_USE_INTEL_JITEVENTS ) - set(intel_jit_profiling IntelJITProfiling) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../IntelJITProfiling) -- include_directories(${PROJECT_BINARY_DIR}/ittapi/include/ ) -+ if(NOT DEFINED ITTAPI_SOURCE_DIR) -+ set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}) -+ endif() -+ include_directories(${ITTAPI_SOURCE_DIR}/include/ ) - endif() - - add_llvm_component_library(LLVMOrcTargetProcess