https://github.com/jhuber6 created 
https://github.com/llvm/llvm-project/pull/174412

Summary:
The code object version defines the ABI the HSA executables follow. This
prevents it from hard-coding it in the OpenCL libraries and preventing
users from overriding it when using them.


>From 7deb0af0b38e0969e6edc6f9bd9de6241f38ad92 Mon Sep 17 00:00:00 2001
From: Joseph Huber <[email protected]>
Date: Mon, 5 Jan 2026 08:40:54 -0600
Subject: [PATCH] [libclc] Suppress AMDGCN code object version for library code

Summary:
The code object version defines the ABI the HSA executables follow. This
prevents it from hard-coding it in the OpenCL libraries and preventing
users from overriding it when using them.
---
 libclc/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index f9ee80645b70f..966ad48e47bb9 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -382,6 +382,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
       if( ARCH STREQUAL clspv64 )
         set( MACRO_ARCH CLSPV64 )
       endif()
+    elseif( ARCH STREQUAL amdgcn )
+      set( build_flags "SHELL:-Xclang -mcode-object-version=none" )
+      set( opt_flags -O3 )
     else()
       set( build_flags )
       set( opt_flags -O3 )

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to