diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index cdfbaad7b7a..e082f23dc02 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1292,6 +1292,89 @@ Library.") ;; toplevel variables cannot be called from one file to another. (define %rocm-llvm-version "7.1.0") +(define %clang-rocm-supported-gpu-targets + ;; List of supported GPU targets for the current version of clang-rocm. + ;; This list can be obtained by running: + ;; + ;; guix shell clang-rocm -- \ + ;; clang --target=amdgcn-amd-amdhsa -mcpu=help -nogpulib + ;; + ;; See also . + ;; Update this list when upgrading clang-rocm. + '("bonaire" + "carrizo" + "fiji" + "generic" + "generic-hsa" + "gfx10-1-generic" + "gfx10-3-generic" + "gfx1010" + "gfx1011" + "gfx1012" + "gfx1013" + "gfx1030" + "gfx1031" + "gfx1032" + "gfx1033" + "gfx1034" + "gfx1035" + "gfx1036" + "gfx11-generic" + "gfx1100" + "gfx1101" + "gfx1102" + "gfx1103" + "gfx1150" + "gfx1151" + "gfx1152" + "gfx1153" + "gfx12-generic" + "gfx1200" + "gfx1201" + "gfx600" + "gfx601" + "gfx602" + "gfx700" + "gfx701" + "gfx702" + "gfx703" + "gfx704" + "gfx705" + "gfx801" + "gfx802" + "gfx803" + "gfx805" + "gfx810" + "gfx9-4-generic" + "gfx9-generic" + "gfx900" + "gfx902" + "gfx904" + "gfx906" + "gfx908" + "gfx909" + "gfx90a" + "gfx90c" + "gfx940" + "gfx941" + "gfx942" + "gfx950" + "hainan" + "hawaii" + "iceland" + "kabini" + "kaveri" + "mullins" + "oland" + "pitcairn" + "polaris10" + "polaris11" + "stoney" + "tahiti" + "tonga" + "tongapro" + "verde")) + (define (make-llvm-rocm llvm-base) (package (inherit llvm-base) @@ -1402,7 +1485,11 @@ This AMD fork includes AMD-specific additions.")))) #:test-target "check-clang" args))) (replace 'add-tools-extra (lambda _ - (copy-recursively "../clang-tools-extra" "tools/extra"))))))))) + (copy-recursively "../clang-tools-extra" "tools/extra"))))))) + + (properties + `((compiler-amd-gpu-targets . ,%clang-rocm-supported-gpu-targets) + ,@(package-properties clang-base))))) (define-public clang-rocm (make-clang-rocm clang-20))