From 38f1d377a59605d0756406e19f0f203d3d73aa1a Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Fri, 12 Sep 2025 15:34:23 +0100 Subject: [PATCH] [SYCL][Native CPU] Add missing components. In the default configuration, effectively components would be linked in implicitly, but with --shared-libs, that is not the case and we need to make sure to list all components we use. Fixes #20061 --- llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt | 6 ++++-- .../compiler_pipeline/CMakeLists.txt | 5 ++++- .../compiler_passes/vecz/CMakeLists.txt | 20 ++++++++++--------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt b/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt index dce987133970b..89eb007ad3403 100644 --- a/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt +++ b/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt @@ -21,15 +21,17 @@ add_llvm_component_library(LLVMSYCLNativeCPUUtils ${LLVM_MAIN_INCLUDE_DIR}/llvm/SYCLLowerIR LINK_COMPONENTS + AggressiveInstCombine Analysis Core - Support + IPO Passes + ScalarOpts + Support SYCLLowerIR Target TargetParser TransformUtils - ipo ${OCK_LIBS} ) diff --git a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/CMakeLists.txt b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/CMakeLists.txt index 90981a1718dac..99b607195be3f 100644 --- a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/CMakeLists.txt +++ b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/CMakeLists.txt @@ -21,8 +21,11 @@ add_llvm_component_library(LLVMNativeCPUPipeline ${CMAKE_CURRENT_SOURCE_DIR}/source/work_item_loops_pass.cpp LINK_COMPONENTS - Passes + Analysis Core + Passes + Support + TransformUtils ) # TODO: Move to under LLVM include and work out why ADDITIONAL_HEADER_DIRS diff --git a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/CMakeLists.txt b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/CMakeLists.txt index 7aa151998effa..ff0c4415d992d 100644 --- a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/CMakeLists.txt +++ b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/CMakeLists.txt @@ -106,16 +106,18 @@ endif() add_llvm_component_library(LLVMNativeCPUVecz ${COMMON_SRCS} LINK_COMPONENTS + AggressiveInstCombine + Analysis + Core + InstCombine + IPO NativeCPUPipeline - support - core - analysis - instcombine - aggressiveinstcombine - transformutils - scalaropts - ipo - passes + Passes + ScalarOpts + Support + Target + TargetParser + TransformUtils ) target_include_directories(LLVMNativeCPUVecz