[libc-commits] [libc] 71168f6 - [libc] Build the `libc` objects using a generic AMDGPU ABI (#65782)

via libc-commits libc-commits at lists.llvm.org
Fri Sep 8 11:17:05 PDT 2023


Author: Joseph Huber
Date: 2023-09-08T13:17:00-05:00
New Revision: 71168f6889b2335c4b394cc617b4247f6ddaa2c7

URL: https://github.com/llvm/llvm-project/commit/71168f6889b2335c4b394cc617b4247f6ddaa2c7
DIFF: https://github.com/llvm/llvm-project/commit/71168f6889b2335c4b394cc617b4247f6ddaa2c7.diff

LOG: [libc] Build the `libc` objects using a generic AMDGPU ABI (#65782)

Summary:
AMDGPU binaries use a "code object" as the ABI indicator. We are
currently trying to move over to a newer code object. We want these
library functions to use the "generic" or default ABI such that it is
specified when linked into the user application. Currently this will
default to v4 as the startup code will use whatever the current default
is.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCObjectRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index c5862a829be5f9b..2c3cf116fc8607d 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -168,6 +168,7 @@ function(_build_gpu_objects fq_target_name internal_target_name)
       if("${gpu_arch}" IN_LIST all_amdgpu_architectures)
         set(gpu_target_triple "amdgcn-amd-amdhsa")
         list(APPEND compile_options "-mcpu=${gpu_arch}")
+        list(APPEND compile_options "SHELL:-Xclang -mcode-object-version=none")
       elseif("${gpu_arch}" IN_LIST all_nvptx_architectures)
         set(gpu_target_triple "nvptx64-nvidia-cuda")
         get_nvptx_compile_options(nvptx_options ${gpu_arch})


        


More information about the libc-commits mailing list