[libclc] [libclc] use default paths with find_program when possible (PR #105969)
Tristan Ross via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 24 19:58:13 PDT 2024
https://github.com/RossComputerGuy created https://github.com/llvm/llvm-project/pull/105969
Patch pulled from https://github.com/NixOS/nixpkgs/pull/336465
This PR removes `NO_DEFAULT_PATH` where possible, the flag prevents Nix from building libclc correctly.
>From e8b910246d0c7c3d9fff994f71c6f8a48ec09a50 Mon Sep 17 00:00:00 2001
From: Tristan Ross <tristan.ross at midstall.com>
Date: Sat, 24 Aug 2024 19:56:24 -0700
Subject: [PATCH] [libclc] use default paths with find_program when possible
---
libclc/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 02bb859ae8590b..6bcd8ae52a5794 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -55,7 +55,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI
# Import required tools
if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
foreach( tool IN ITEMS clang llvm-as llvm-link opt )
- find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+ find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} )
set( ${tool}_exe ${LLVM_TOOL_${tool}} )
set( ${tool}_target )
endforeach()
@@ -104,7 +104,7 @@ foreach( tool IN ITEMS clang opt llvm-as llvm-link )
endforeach()
# llvm-spirv is an optional dependency, used to build spirv-* targets.
-find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} )
if( LLVM_SPIRV )
add_executable( libclc::llvm-spirv IMPORTED GLOBAL )
More information about the cfe-commits
mailing list