intel / opencl-clang

Other
136 stars 62 forks source link

unqualified call to llvm-config #497

Closed anbe42 closed 1 year ago

anbe42 commented 1 year ago

Commit 1cde56c6cf1feaeb8f21b62f811c5c5d3c78da41 in branch ocl-open-170 added a call to llvm-config --libs all without checking where llvm-config resides ... on Debian it is not in the path (only llvm-config-17 is) but probably in ${LLVM_TOOLS_BINARY_DIR}.

cmake will complain about too few arguments to REGEX REPLACE as the last argument is empty if the llvm-config call failed.

Maybe you need

find_program(LLVM_CONFIG_EXE "llvm-config" ${LLVM_TOOLS_BINARY_DIR})

(untested, modeled after llvm-tblgen usage)

wenju-he commented 1 year ago

@anbe42 thank you for reporting the issue. You're right that we should use find_program. Will be fixed by https://github.com/intel/opencl-clang/pull/500 https://github.com/intel/opencl-clang/pull/501 https://github.com/intel/opencl-clang/pull/502

wenju-he commented 1 year ago

PRs are merged into 16/17/main branches. Closing this issue.