From d2f71daf4400fd755ad4849374dae7c84301804d Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Mon, 15 Sep 2025 12:04:46 +0100 Subject: [PATCH] [SYCL][Native CPU] More --shared-libs fixes. * SYCLNativeCPUUtils/CMakeLists.txt: remove EXCLUDE_FROM_ALL. The rationale for setting EXCLUDE_FROM_ALL was to ensure that users do not get the veczc binary unnecessarily but that is already handled differently now that we no longer fetch external sources, and EXCLUDE_FROM_ALL had the side effect of preventing component libraries from being installed. * vecz/tools/CMakeLists.txt: change veczc from tool to utility. The difference is that tools get installed, utilities by default don't, and this is not something that is meant to be installed. * lib/CMakeLists.txt: change include order. SYCLNativeCPUUtils needs to be included after TargetParser so that veczc correctly links to it. Fixes #20077 --- llvm/lib/CMakeLists.txt | 2 +- llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt | 2 +- .../compiler_passes/vecz/tools/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt index e2ec351ed5f6f..96873244f3ee5 100644 --- a/llvm/lib/CMakeLists.txt +++ b/llvm/lib/CMakeLists.txt @@ -41,9 +41,9 @@ add_subdirectory(LineEditor) add_subdirectory(ProfileData) add_subdirectory(Passes) add_subdirectory(SYCLLowerIR) -add_subdirectory(SYCLNativeCPUUtils) add_subdirectory(SYCLPostLink) add_subdirectory(TargetParser) +add_subdirectory(SYCLNativeCPUUtils) add_subdirectory(TextAPI) add_subdirectory(Telemetry) add_subdirectory(ToolDrivers) diff --git a/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt b/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt index 89eb007ad3403..cb3e3fff77814 100644 --- a/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt +++ b/llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT "native_cpu" IN_LIST SYCL_ENABLE_BACKENDS) endif() if(NATIVECPU_USE_OCK) - add_subdirectory(compiler_passes EXCLUDE_FROM_ALL) + add_subdirectory(compiler_passes) set(OCK_LIBS NativeCPUPipeline NativeCPUVecz) endif() diff --git a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/tools/CMakeLists.txt b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/tools/CMakeLists.txt index 921204b382aa0..5a51ce168d8a1 100644 --- a/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/tools/CMakeLists.txt +++ b/llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/tools/CMakeLists.txt @@ -1,7 +1,7 @@ llvm_map_components_to_libnames(llvm_libs all ${LLVM_TARGETS_TO_BUILD}) list(REMOVE_ITEM llvm_libs LTO OptRemarks) -add_llvm_tool(veczc +add_llvm_utility(veczc ${CMAKE_CURRENT_SOURCE_DIR}/source/veczc.cpp ) target_compile_options(veczc PRIVATE ${VECZ_COMPILE_OPTIONS})