From 0fa0857c7eceb8985f3c8f118a13606cfe2dc5cb Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sun, 3 May 2026 16:21:24 +0300 Subject: [PATCH] fix: include spirv platform in clang branch of run_hipcc.cmake HIP_PLATFORM=spirv (chipStar) was falling into the nvcc else-branch, which appended '--compiler-options -fPIC' for shared libraries. clang does not understand this nvcc-specific flag syntax, causing compilation to fail with: clang++: error: no such file or directory: ''-fPIC'' --- cmake/FindHIP/run_hipcc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindHIP/run_hipcc.cmake b/cmake/FindHIP/run_hipcc.cmake index aeb943c15f..2643fb5d85 100644 --- a/cmake/FindHIP/run_hipcc.cmake +++ b/cmake/FindHIP/run_hipcc.cmake @@ -66,7 +66,7 @@ execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler OUTPUT_VARIABLE H execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --runtime OUTPUT_VARIABLE HIP_RUNTIME OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT host_flag) set(__CC ${HIP_HIPCC_EXECUTABLE}) - if("${HIP_PLATFORM}" STREQUAL "amd") + if("${HIP_PLATFORM}" STREQUAL "amd" OR "${HIP_PLATFORM}" STREQUAL "spirv") if("${HIP_COMPILER}" STREQUAL "clang") if(NOT "x${HIP_CLANG_PATH}" STREQUAL "x") set(ENV{HIP_CLANG_PATH} ${HIP_CLANG_PATH})